diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-28 15:32:59 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-28 15:32:59 (GMT) |
commit | 14aa95bf83e8fa91151b5edd3c346c20d942eb81 (patch) | |
tree | 46ec6389eb1590e0a018c4acbfba670d315987ba /examples/animation/moveblocks/main.cpp | |
parent | 1c72e77e43593dfea6c6392d1058e63762efb534 (diff) | |
parent | f340825f35ad3de28685f4890cd73bbf9bb6c0e6 (diff) | |
download | Qt-14aa95bf83e8fa91151b5edd3c346c20d942eb81.zip Qt-14aa95bf83e8fa91151b5edd3c346c20d942eb81.tar.gz Qt-14aa95bf83e8fa91151b5edd3c346c20d942eb81.tar.bz2 |
Merge branch 'qtwebkit-4.6-staging' into qtscript-jsc-backend
Conflicts:
src/corelib/tools/qregexp.cpp
src/script/qscriptengine.cpp
src/script/qscriptvalue.cpp
Diffstat (limited to 'examples/animation/moveblocks/main.cpp')
-rw-r--r-- | examples/animation/moveblocks/main.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/animation/moveblocks/main.cpp b/examples/animation/moveblocks/main.cpp index c43e841..97d3f81 100644 --- a/examples/animation/moveblocks/main.cpp +++ b/examples/animation/moveblocks/main.cpp @@ -108,8 +108,7 @@ class StateSwitcher : public QState Q_OBJECT public: StateSwitcher(QStateMachine *machine) - : QState(machine->rootState()), m_machine(machine), - m_stateCount(0), m_lastIndex(0) + : QState(machine), m_stateCount(0), m_lastIndex(0) { } //![10] @@ -120,7 +119,7 @@ public: while ((n = (qrand() % m_stateCount + 1)) == m_lastIndex) { } m_lastIndex = n; - m_machine->postEvent(new StateSwitchEvent(n)); + machine()->postEvent(new StateSwitchEvent(n)); } virtual void onExit(QEvent *) {} //![11] @@ -135,7 +134,6 @@ public: //![12] private: - QStateMachine *m_machine; int m_stateCount; int m_lastIndex; }; |