aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/applicationlauncher.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-04-29 16:52:58 +0200
committerTobias Hunger <tobias.hunger@qt.io>2016-05-11 10:04:38 +0000
commitddefe062c73e35def585f8fc6c90a4f18e47c0f4 (patch)
tree03c3aecc501c03b92e259fe0ae1c4d472033b7e5 /src/plugins/projectexplorer/applicationlauncher.cpp
parent1a248b1b932e2c7c42e25993d921e78c52aa4bcf (diff)
Fix up QProcess::waitForFinished()
waitForFinish returns false if the process is no longer running at the time of the call. Handle that throughout the codebase. Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094 Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/projectexplorer/applicationlauncher.cpp')
-rw-r--r--src/plugins/projectexplorer/applicationlauncher.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp
index e397454803..4c14e9a5bb 100644
--- a/src/plugins/projectexplorer/applicationlauncher.cpp
+++ b/src/plugins/projectexplorer/applicationlauncher.cpp
@@ -174,7 +174,7 @@ void ApplicationLauncher::stop()
return;
if (d->m_currentMode == Gui) {
d->m_guiProcess.terminate();
- if (!d->m_guiProcess.waitForFinished(1000)) { // This is blocking, so be fast.
+ if (!d->m_guiProcess.waitForFinished(1000) && d->m_guiProcess.state() == QProcess::Running) { // This is blocking, so be fast.
d->m_guiProcess.kill();
d->m_guiProcess.waitForFinished();
}