From 41efabf5c8fcb497185218e8f3d31d1d3195ac00 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 19 Nov 2013 12:09:17 +0100 Subject: [PATCH] Device support: Fix device application runner for the "early exit" case. If the state is Inactive when calling setFinished(), the finished() signal will not be emitted and the run control will never finish. Change-Id: I0c29138c31205cf43472d42821fd1a6af93cc1ac Reviewed-by: hjk Reviewed-by: Christian Kandeler --- .../projectexplorer/devicesupport/deviceapplicationrunner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/devicesupport/deviceapplicationrunner.cpp b/src/plugins/projectexplorer/devicesupport/deviceapplicationrunner.cpp index 4a413ac08a..8433ace8a9 100644 --- a/src/plugins/projectexplorer/devicesupport/deviceapplicationrunner.cpp +++ b/src/plugins/projectexplorer/devicesupport/deviceapplicationrunner.cpp @@ -86,6 +86,7 @@ void DeviceApplicationRunner::start(const IDevice::ConstPtr &device, { QTC_ASSERT(d->state == Inactive, return); + d->state = Run; if (!device) { emit reportError(tr("Cannot run: No device.")); setFinished(); @@ -101,7 +102,6 @@ void DeviceApplicationRunner::start(const IDevice::ConstPtr &device, d->stopRequested = false; d->success = true; - d->state = Run; d->deviceProcess = device->createProcess(this); connect(d->deviceProcess, SIGNAL(started()), SIGNAL(remoteProcessStarted())); connect(d->deviceProcess, SIGNAL(readyReadStandardOutput()), SLOT(handleRemoteStdout())); -- GitLab