diff options
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 0ce3ecc30e..885bc69d6c 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -1499,8 +1499,7 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta pendingErrorStates.insert(currentErrorState); addDescendantStatesToEnter(currentErrorState, pendingErrorStates, pendingErrorStatesForDefaultEntry); addAncestorStatesToEnter(currentErrorState, rootState(), pendingErrorStates, pendingErrorStatesForDefaultEntry); - foreach (QAbstractState *s, configuration) - pendingErrorStates.remove(s); + pendingErrorStates -= configuration; } else { qWarning("Unrecoverable error detected in running state machine: %s", qPrintable(errorString)); |