diff options
author | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-05-07 09:45:19 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-05-07 09:45:19 (GMT) |
commit | 56d27b54e2fe64782250e8e39012f345588cfad5 (patch) | |
tree | 1a8e3199886f9604bb5a011107f530b6bc279503 | |
parent | 576dca0086b1566eafe9a24cf5946f46f4e857bf (diff) | |
download | Qt-56d27b54e2fe64782250e8e39012f345588cfad5.zip Qt-56d27b54e2fe64782250e8e39012f345588cfad5.tar.gz Qt-56d27b54e2fe64782250e8e39012f345588cfad5.tar.bz2 |
Rename NoDefaultStateInHistoryState -> NoDefaultStateInHistoryStateError for consistency
The other error values have Error in the name for namespacing purposes.
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 8 | ||||
-rw-r--r-- | src/corelib/statemachine/qstatemachine.h | 2 | ||||
-rw-r--r-- | tests/auto/qstatemachine/tst_qstatemachine.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index efcf707..dcdf5ed 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -595,7 +595,7 @@ void QStateMachinePrivate::addStatesToEnter(QAbstractState *s, QState *root, hlst.append(QHistoryStatePrivate::get(h)->defaultState); if (hlst.isEmpty()) { - setError(QStateMachine::NoDefaultStateInHistoryState, h); + setError(QStateMachine::NoDefaultStateInHistoryStateError, h); } else { for (int k = 0; k < hlst.size(); ++k) { QAbstractState *s0 = hlst.at(k); @@ -981,7 +981,7 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta .arg(currentContext->objectName()); break; - case QStateMachine::NoDefaultStateInHistoryState: + case QStateMachine::NoDefaultStateInHistoryStateError: Q_ASSERT(currentContext != 0); errorString = QStateMachine::tr("Missing default state in history state '%1'") @@ -1568,9 +1568,9 @@ void QStateMachine::setErrorState(QAbstractState *state) \value NoInitialStateError The machine has entered a QState with children which does not have an initial state set. The context of this error is the state which is missing an initial state. - \value NoDefaultStateInHistoryState The machine has entered a QHistoryState which does not have + \value NoDefaultStateInHistoryStateError The machine has entered a QHistoryState which does not have a default state set. The context of this error is the QHistoryState which is missing a - default state. + default state. \sa setErrorState() */ diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h index d0927a3..d73404a 100644 --- a/src/corelib/statemachine/qstatemachine.h +++ b/src/corelib/statemachine/qstatemachine.h @@ -86,7 +86,7 @@ public: enum Error { NoError, NoInitialStateError, - NoDefaultStateInHistoryState, + NoDefaultStateInHistoryStateError, NoCommonAncestorForTransitionError }; diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index e7ea403..3876a20 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -877,7 +877,7 @@ void tst_QStateMachine::historyStateHasNowhereToGo() QCOMPARE(machine.configuration().count(), 1); QVERIFY(machine.configuration().contains(machine.errorState())); - QCOMPARE(machine.error(), QStateMachine::NoDefaultStateInHistoryState); + QCOMPARE(machine.error(), QStateMachine::NoDefaultStateInHistoryStateError); QCOMPARE(machine.errorString(), QString::fromLatin1("Missing default state in history state 'historyState'")); } |