aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Nätterlund <tobias.naetterlund.qnx@kdab.com>2012-09-05 15:49:52 +0200
committerDaniel Teske <daniel.teske@nokia.com>2012-09-06 11:01:55 +0200
commit90357124f1dc2e2f36571584fa951e2cf6565f2c (patch)
tree06fd2b589ea8b9f92576e5a10c2fbe94c9d266fc
parent7aeac1d5f7563cc21a56b5d86f9ef7323e791e26 (diff)
QNX: Fixed running the application if first attempt failed
When the first attempt to run an application on the BlackBerry device failed, e.g. due to not being able to connect to the device, the Play button remained disabled, so any subsequent attempts to run the application was not possible. Change-Id: I2b9778f7b936e06b2594d2485d7e5575cddbba14 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
-rw-r--r--src/plugins/qnx/blackberryapplicationrunner.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/qnx/blackberryapplicationrunner.cpp b/src/plugins/qnx/blackberryapplicationrunner.cpp
index e22980f6eb..c946584ddf 100644
--- a/src/plugins/qnx/blackberryapplicationrunner.cpp
+++ b/src/plugins/qnx/blackberryapplicationrunner.cpp
@@ -155,6 +155,7 @@ void BlackBerryApplicationRunner::startFinished(int exitCode, QProcess::ExitStat
const QString errorString = (m_launchProcess->error() != QProcess::UnknownError)
? m_launchProcess->errorString() : tr("Launching application failed");
emit startFailed(errorString);
+ reset();
}
}
@@ -344,9 +345,11 @@ void BlackBerryApplicationRunner::reset()
m_stopping = false;
m_runningStateTimer->stop();
- m_runningStateProcess->terminate();
- if (!m_runningStateProcess->waitForFinished(1000))
- m_runningStateProcess->kill();
+ if (m_runningStateProcess) {
+ m_runningStateProcess->terminate();
+ if (!m_runningStateProcess->waitForFinished(1000))
+ m_runningStateProcess->kill();
+ }
if (m_tailProcess && m_tailProcess->isProcessRunning())
killTailProcess();