AppOutputPane: Update buttons after stop was initiated

Otherwise it's possible to quicky press the stop button
again before the process actually finishes and this leads
to inconsistent state transition, resulting in assert
being triggered.

Change-Id: I4618a00cb9cea666992bc9ee6b60b3b3a0d9a8b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-07-06 17:16:20 +02:00
parent 3007b990e5
commit e6001ae2a0

View File

@@ -606,8 +606,10 @@ void AppOutputPane::stopRunControl()
QTC_ASSERT(rc, return); QTC_ASSERT(rc, return);
if (rc->isRunning()) { if (rc->isRunning()) {
if (optionallyPromptToStop(rc)) if (optionallyPromptToStop(rc)) {
rc->initiateStop(); rc->initiateStop();
enableButtons(rc);
}
} else { } else {
QTC_CHECK(false); QTC_CHECK(false);
rc->forceStop(); rc->forceStop();