summaryrefslogtreecommitdiffstats
path: root/examples/animation
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/animation
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/animation')
-rw-r--r--examples/animation/sub-attaq/boat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/animation/sub-attaq/boat.cpp b/examples/animation/sub-attaq/boat.cpp
index 5721485..f01f1bb 100644
--- a/examples/animation/sub-attaq/boat.cpp
+++ b/examples/animation/sub-attaq/boat.cpp
@@ -200,7 +200,7 @@ Boat::Boat(QGraphicsItem * parent, Qt::WindowFlags wFlags)
stopState->addTransition(downFireMove);
//Finally the launch state should come back to its original state
- QHistoryState *historyState = moving->addHistoryState();
+ QHistoryState *historyState = new QHistoryState(moving);
launchStateLeft->addTransition(historyState);
launchStateRight->addTransition(historyState);