Commit 41efabf5 authored by Christian Kandeler's avatar Christian Kandeler

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: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 8380cb6e
......@@ -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()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment