ProjectExplorer: Allow RunWorker::Starting -> Stopping

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

Change-Id: Ibeee0a6992af80d3486b00890664e83525f17204
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
hjk
2017-08-09 12:06:05 +02:00
parent a62f882c42
commit 4023e56d42

View File

@@ -825,7 +825,9 @@ void RunControlPrivate::continueStart()
void RunControlPrivate::initiateStop() void RunControlPrivate::initiateStop()
{ {
checkState(RunControlState::Running); if (state != RunControlState::Starting && state != RunControlState::Running)
qDebug() << "Unexpected initiateStop() in state" << stateName(state);
setState(RunControlState::Stopping); setState(RunControlState::Stopping);
debugMessage("Queue: Stopping for all workers"); debugMessage("Queue: Stopping for all workers");
@@ -1214,6 +1216,7 @@ bool RunControlPrivate::isAllowedTransition(RunControlState from, RunControlStat
|| to == RunControlState::Finishing; || to == RunControlState::Finishing;
case RunControlState::Starting: case RunControlState::Starting:
return to == RunControlState::Running return to == RunControlState::Running
|| to == RunControlState::Stopping
|| to == RunControlState::Finishing; || to == RunControlState::Finishing;
case RunControlState::Running: case RunControlState::Running:
return to == RunControlState::Stopping return to == RunControlState::Stopping