summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/statemachine')
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 392c45d8c7..b2af5ca961 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -1245,9 +1245,7 @@ void QStateMachinePrivate::_q_process()
#endif
while (processing) {
if (stop) {
- stop = false;
processing = false;
- stopProcessingReason = Stopped;
break;
}
QSet<QAbstractTransition*> enabledTransitions;
@@ -1299,6 +1297,11 @@ void QStateMachinePrivate::_q_process()
#ifdef QSTATEMACHINE_DEBUG
qDebug() << q << ": finished the event processing loop";
#endif
+ if (stop) {
+ stop = false;
+ stopProcessingReason = Stopped;
+ }
+
switch (stopProcessingReason) {
case EventQueueEmpty:
break;