diff options
author | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-05-14 13:08:03 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-05-14 13:08:03 (GMT) |
commit | 17d8f734c038705f7f8196dfe5e8902c808a4945 (patch) | |
tree | b6ac1d09fbe41d4d486e4fe9fe7ecb58dc7c209a /tests/auto/qstatemachine | |
parent | ededfad305258f9f450b314d9e2d53a6905bc6d0 (diff) | |
download | Qt-17d8f734c038705f7f8196dfe5e8902c808a4945.zip Qt-17d8f734c038705f7f8196dfe5e8902c808a4945.tar.gz Qt-17d8f734c038705f7f8196dfe5e8902c808a4945.tar.bz2 |
Make QAbstractTransition::eventTest() non-const
We decided to remove the const of the eventTest() since some transitions
have dynamic conditions and need to update when eventTest() is called.
Diffstat (limited to 'tests/auto/qstatemachine')
-rw-r--r-- | tests/auto/qstatemachine/tst_qstatemachine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index f8a778a..7476831 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -204,7 +204,7 @@ public: : QAbstractTransition(QList<QAbstractState*>() << target) {} QList<int> triggers; protected: - virtual bool eventTest(QEvent *) const { + virtual bool eventTest(QEvent *) { return true; } virtual void onTransition(QEvent *) { @@ -246,7 +246,7 @@ public: EventTransition(QEvent::Type type, QAbstractState *target, QState *parent = 0) : QAbstractTransition(QList<QAbstractState*>() << target, parent), m_type(type) {} protected: - virtual bool eventTest(QEvent *e) const { + virtual bool eventTest(QEvent *e) { return (e->type() == m_type); } virtual void onTransition(QEvent *) {} @@ -1394,7 +1394,7 @@ public: : QAbstractTransition(QList<QAbstractState*>() << target), m_value(value) {} protected: - virtual bool eventTest(QEvent *e) const + virtual bool eventTest(QEvent *e) { if (e->type() != QEvent::Type(QEvent::User+2)) return false; @@ -1596,7 +1596,7 @@ public: return m_args; } protected: - bool eventTest(QEvent *e) const { + bool eventTest(QEvent *e) { if (!QSignalTransition::eventTest(e)) return false; QSignalEvent *se = static_cast<QSignalEvent*>(e); |