From fcdd588bb667f6e99408e377e0966cd7aeeaa08a Mon Sep 17 00:00:00 2001 From: Pawel Polanski <pawel.3.polanski@nokia.com> Date: Mon, 22 Nov 2010 10:47:39 +0100 Subject: [PATCH] Fixed USB detach related bug on Symbian Task-Number: QTCREATORBUG-3100 Reviewed-by: Tobias Hunger --- .../qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp | 7 ++++--- .../qt4projectmanager/qt-s60/s60devicerunconfiguration.h | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp index 128a96347e9..19f823f6b77 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp @@ -468,7 +468,6 @@ RunConfiguration *S60DeviceRunConfigurationFactory::clone(Target *parent, RunCon S60DeviceRunControl::S60DeviceRunControl(RunConfiguration *runConfiguration, QString mode) : RunControl(runConfiguration, mode), m_toolChain(ProjectExplorer::ToolChain_INVALID), - m_handleDeviceRemoval(true), m_launcher(0) { // connect for automatically reporting the "finished deploy" state to the progress manager @@ -606,7 +605,6 @@ void S60DeviceRunControl::printConnectFailed(const QString &errorMessage) void S60DeviceRunControl::launcherFinished() { - m_handleDeviceRemoval = false; trk::Launcher::releaseToDeviceManager(m_launcher); m_launcher->deleteLater(); m_launcher = 0; @@ -672,7 +670,10 @@ void S60DeviceRunControl::printApplicationOutput(const QString &output, bool onS void S60DeviceRunControl::deviceRemoved(const SymbianUtils::SymbianDevice &d) { - if (m_handleDeviceRemoval && d.portName() == m_serialPortName) { + if (m_launcher && d.portName() == m_serialPortName) { + trk::Launcher::releaseToDeviceManager(m_launcher); + m_launcher->deleteLater(); + m_launcher = 0; appendMessage(this, tr("The device '%1' has been disconnected").arg(d.friendlyName()), true); emit finished(); } diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h index 8e0b479febd..151ed6748e1 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h @@ -188,7 +188,6 @@ private: QString m_executableFileName; QString m_qtDir; QString m_qtBinPath; - bool m_handleDeviceRemoval; trk::Launcher *m_launcher; char m_installationDrive; }; -- GitLab