summaryrefslogtreecommitdiffstats
path: root/examples/statemachine
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 /examples/statemachine
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 'examples/statemachine')
-rw-r--r--examples/statemachine/pauseandresume/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/statemachine/pauseandresume/main.cpp b/examples/statemachine/pauseandresume/main.cpp
index e0ebbff..5bacb41 100644
--- a/examples/statemachine/pauseandresume/main.cpp
+++ b/examples/statemachine/pauseandresume/main.cpp
@@ -73,7 +73,7 @@ public:
s1->addTransition(pb, SIGNAL(clicked()), s2);
s2->addTransition(pb, SIGNAL(clicked()), s1);
- QHistoryState *h = process->addHistoryState();
+ QHistoryState *h = new QHistoryState(process);
h->setDefaultState(s1);
QState *interrupted = new QState(machine->rootState());