Commit 4023e56d authored by hjk's avatar hjk

ProjectExplorer: Allow RunWorker::Starting -> Stopping

Can happen on worker startup, e.g. missing binaries, permissions, ...

Change-Id: Ibeee0a6992af80d3486b00890664e83525f17204
Reviewed-by: Ulf Hermann's avatarUlf Hermann <ulf.hermann@qt.io>
parent a62f882c
......@@ -825,7 +825,9 @@ void RunControlPrivate::continueStart()
void RunControlPrivate::initiateStop()
{
checkState(RunControlState::Running);
if (state != RunControlState::Starting && state != RunControlState::Running)
qDebug() << "Unexpected initiateStop() in state" << stateName(state);
setState(RunControlState::Stopping);
debugMessage("Queue: Stopping for all workers");
......@@ -1214,6 +1216,7 @@ bool RunControlPrivate::isAllowedTransition(RunControlState from, RunControlStat
|| to == RunControlState::Finishing;
case RunControlState::Starting:
return to == RunControlState::Running
|| to == RunControlState::Stopping
|| to == RunControlState::Finishing;
case RunControlState::Running:
return to == RunControlState::Stopping
......
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