forked from qt-creator/qt-creator
Remove process only when FailedToStart error occurred
Otherwise don't remove it yet, as many usages of QtcProcess expect that we are still going to receive Finished signal after an error occurred. Change-Id: I8cae402bc2ef5064bbae964217f49028a31a73af Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -144,6 +144,10 @@ void LauncherSocketHandler::handleProcessError()
|
|||||||
packet.error = proc->error();
|
packet.error = proc->error();
|
||||||
packet.errorString = proc->errorString();
|
packet.errorString = proc->errorString();
|
||||||
sendPacket(packet);
|
sendPacket(packet);
|
||||||
|
|
||||||
|
// In case of FailedToStart we won't receive finished signal, so we remove the process here.
|
||||||
|
// For all other errors we should expect corresponding finished signal to appear.
|
||||||
|
if (proc->error() == QProcess::FailedToStart)
|
||||||
removeProcess(proc->token());
|
removeProcess(proc->token());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user