ProjectExplorer: Allow user stopping ill-behaved RunControl

If a RunWorker fails to report success or failure (should not happen in
theory, but has been observed in practice, typically in exceptional code
paths) the RunControl will stay in 'Starting' or 'Stopping' state
forever. Give the user the opportunity to force a 'Stopped' state by a
second (or when 'Running' a third) time on the Stop button.

Change-Id: Iec58434927777bd67bfe01c5144ee5695b4d6cf1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-09-12 08:47:17 +02:00
parent 89d08bf4b2
commit 7f2cb9ead9
3 changed files with 46 additions and 2 deletions

View File

@@ -534,9 +534,9 @@ void AppOutputPane::stopRunControl()
if (rc->isRunning() && optionallyPromptToStop(rc))
rc->initiateStop();
else if (rc->isStarting()) {
else {
QTC_CHECK(false);
rc->initiateStop();
rc->forceStop();
}
if (debug)