summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-04-29 06:25:03 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-04-29 06:29:47 (GMT)
commitf810a0210c0cdd1ba070f16ebebdec1da7c72b50 (patch)
tree37e76a3e7fb70b41aab0fa250aaeb0c731571108 /tests
parent2c22f8748f62db3cd4c2782abcd19c273f4a4426 (diff)
downloadQt-f810a0210c0cdd1ba070f16ebebdec1da7c72b50.zip
Qt-f810a0210c0cdd1ba070f16ebebdec1da7c72b50.tar.gz
Qt-f810a0210c0cdd1ba070f16ebebdec1da7c72b50.tar.bz2
make history state constructible
Decided in API review. The intention of QHistoryState not being constructible was so that people wouldn't subclass it and reimplement onEntry()/onExit(), thinking that those functions would actually get called (which they won't). However, we recently added the entered() signal to QAbstractState, so people are going to connect to it and ask why they never get the signal for a QHistoryState. We might as well make QHistoryState constructible and just document that it doesn't make sense to subclass it.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
index db25ad5..1c5f52b 100644
--- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
@@ -823,7 +823,7 @@ void tst_QStateMachine::historyStateHasNowhereToGo()
brokenState->setObjectName("brokenState");
brokenState->setInitialState(new QState(brokenState));
- QHistoryState *historyState = brokenState->addHistoryState();
+ QHistoryState *historyState = new QHistoryState(brokenState);
historyState->setObjectName("historyState");
initialState->addTransition(new EventTransition(QEvent::User, historyState));
@@ -1587,7 +1587,7 @@ void tst_QStateMachine::historyStates()
QState *s0 = new QState(root);
QState *s00 = new QState(s0);
QState *s01 = new QState(s0);
- QHistoryState *s0h = s0->addHistoryState();
+ QHistoryState *s0h = new QHistoryState(s0);
QState *s1 = new QState(root);
QFinalState *s2 = new QFinalState(root);