forked from qt-creator/qt-creator
Set process state to NotRunning after FailedToStart error
Remove the process in process launcher after error has appeared. Remove unneeded stopStopProcedure as we are disconnecting from process' signals inside removeProcess(). In order to behave as much similar to what QProcess does, provide a test that: - ensures the FailedToStart error is synchronously emitted when waitForStarted is being executed - ensures that process state is reset to NotRunning after FailedToStart error - 2nd call to start/waitForStarted doesn't block on waitForStarted Change-Id: I139354421d037739f1cc1a2685b66f1e5b6170c8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -213,6 +213,7 @@ bool CallerHandle::shouldFlushFor(SignalType signalType) const
|
||||
void CallerHandle::handleError(const ErrorSignal *launcherSignal)
|
||||
{
|
||||
QTC_ASSERT(isCalledFromCallersThread(), return);
|
||||
m_processState = QProcess::NotRunning;
|
||||
m_error = launcherSignal->error();
|
||||
m_errorString = launcherSignal->errorString();
|
||||
emit errorOccurred(m_error);
|
||||
|
||||
Reference in New Issue
Block a user