~ubuntu-branches/ubuntu/trusty/qtcreator-plugin-ubuntu/trusty

« back to all changes in this revision

Viewing changes to src/ubuntu/ubuntudevice.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Zoltán Balogh, Benjamin Zeller
  • Date: 2014-04-15 08:32:25 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20140415083225-w64zq0u7qgzmswa7
Tags: 3.0.1+14.04.20140415-0ubuntu1
[ Zoltán Balogh ]
* Change Ubuntu API link and add link to HTML5 docs (LP: #1303535)
  (LP: #1303535)
* Remove .desktop linking to the ~/.local/share/applications
* Replace scripts and share paths even if there is no device (LP:
  #1307713) (LP: #1307713)

[ Benjamin Zeller ]
* Added missing plugin dependencies. Refresh ADB on startup .

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
 
396
396
void UbuntuDeviceHelper::deviceConnected()
397
397
{
 
398
    qDebug()<<"Device "<<m_dev->id().toString()<<" connected";
398
399
    ProjectExplorer::DeviceManager::instance()->setDeviceState(m_dev->id(),ProjectExplorer::IDevice::DeviceConnected);
399
400
    detect();
400
401
}
401
402
 
402
403
void UbuntuDeviceHelper::deviceDisconnected()
403
404
{
 
405
    qDebug()<<"Device "<<m_dev->id().toString()<<" disconnected";
404
406
    ProjectExplorer::DeviceManager::instance()->setDeviceState(m_dev->id(),ProjectExplorer::IDevice::DeviceDisconnected);
 
407
 
 
408
    setProcessState(UbuntuDevice::NotStarted);
 
409
    stopProcess();
405
410
    resetToDefaults();
 
411
 
406
412
    emit disconnected();
407
413
}
408
414
 
426
432
void UbuntuDeviceHelper::stopProcess()
427
433
{
428
434
    if(m_process) {
429
 
        m_process->kill();
430
 
        m_process->waitForFinished();
 
435
        m_process->disconnect(this);
 
436
        if(m_process->state() != QProcess::NotRunning) {
 
437
            m_process->kill();
 
438
            m_process->waitForFinished();
 
439
        }
431
440
        m_process->deleteLater();
432
441
        m_process = 0;
433
442
    }
961
970
        case Done:
962
971
            return tr("Finished");
963
972
    }
 
973
    return QString();
964
974
}
965
975
 
966
976
ProjectExplorer::IDeviceWidget *UbuntuDevice::createWidget()