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 /src/corelib/statemachine | |
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 'src/corelib/statemachine')
-rw-r--r-- | src/corelib/statemachine/qabstracttransition.cpp | 4 | ||||
-rw-r--r-- | src/corelib/statemachine/qabstracttransition.h | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qabstracttransition_p.h | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qeventtransition.cpp | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qeventtransition.h | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qsignaltransition.cpp | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qsignaltransition.h | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qstate.cpp | 2 | ||||
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 2 |
9 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp index f7a7d34..a930581 100644 --- a/src/corelib/statemachine/qabstracttransition.cpp +++ b/src/corelib/statemachine/qabstracttransition.cpp @@ -125,9 +125,9 @@ QStateMachine *QAbstractTransitionPrivate::machine() const return 0; } -bool QAbstractTransitionPrivate::callEventTest(QEvent *e) const +bool QAbstractTransitionPrivate::callEventTest(QEvent *e) { - Q_Q(const QAbstractTransition); + Q_Q(QAbstractTransition); return q->eventTest(e); } diff --git a/src/corelib/statemachine/qabstracttransition.h b/src/corelib/statemachine/qabstracttransition.h index 8f0cefa..c63d55a 100644 --- a/src/corelib/statemachine/qabstracttransition.h +++ b/src/corelib/statemachine/qabstracttransition.h @@ -88,7 +88,7 @@ public: #endif protected: - virtual bool eventTest(QEvent *event) const = 0; + virtual bool eventTest(QEvent *event) = 0; virtual void onTransition(QEvent *event) = 0; diff --git a/src/corelib/statemachine/qabstracttransition_p.h b/src/corelib/statemachine/qabstracttransition_p.h index 156e70e..a6db220 100644 --- a/src/corelib/statemachine/qabstracttransition_p.h +++ b/src/corelib/statemachine/qabstracttransition_p.h @@ -75,7 +75,7 @@ public: static QAbstractTransitionPrivate *get(QAbstractTransition *q); static const QAbstractTransitionPrivate *get(const QAbstractTransition *q); - bool callEventTest(QEvent *e) const; + bool callEventTest(QEvent *e); void callOnTransition(QEvent *e); QState *sourceState() const; QStateMachine *machine() const; diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp index 3ae3ed9..74eb577 100644 --- a/src/corelib/statemachine/qeventtransition.cpp +++ b/src/corelib/statemachine/qeventtransition.cpp @@ -252,7 +252,7 @@ void QEventTransition::setEventObject(QObject *object) /*! \reimp */ -bool QEventTransition::eventTest(QEvent *event) const +bool QEventTransition::eventTest(QEvent *event) { Q_D(const QEventTransition); if (event->type() == QEvent::Wrapped) { diff --git a/src/corelib/statemachine/qeventtransition.h b/src/corelib/statemachine/qeventtransition.h index 68ee4fc..3530bdd 100644 --- a/src/corelib/statemachine/qeventtransition.h +++ b/src/corelib/statemachine/qeventtransition.h @@ -71,7 +71,7 @@ public: void setEventType(QEvent::Type type); protected: - bool eventTest(QEvent *event) const; + bool eventTest(QEvent *event); void onTransition(QEvent *event); bool event(QEvent *e); diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp index fd17292..4caa917 100644 --- a/src/corelib/statemachine/qsignaltransition.cpp +++ b/src/corelib/statemachine/qsignaltransition.cpp @@ -225,7 +225,7 @@ void QSignalTransition::setSignal(const QByteArray &signal) true if the event's sender and signal index match this transition, and returns false otherwise. */ -bool QSignalTransition::eventTest(QEvent *event) const +bool QSignalTransition::eventTest(QEvent *event) { Q_D(const QSignalTransition); if (event->type() == QEvent::Signal) { diff --git a/src/corelib/statemachine/qsignaltransition.h b/src/corelib/statemachine/qsignaltransition.h index 7f457b8..b485785 100644 --- a/src/corelib/statemachine/qsignaltransition.h +++ b/src/corelib/statemachine/qsignaltransition.h @@ -72,7 +72,7 @@ public: void setSignal(const QByteArray &signal); protected: - bool eventTest(QEvent *event) const; + bool eventTest(QEvent *event); void onTransition(QEvent *event); bool event(QEvent *e); diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp index 8893bfe..e42e463 100644 --- a/src/corelib/statemachine/qstate.cpp +++ b/src/corelib/statemachine/qstate.cpp @@ -363,7 +363,7 @@ public: : QAbstractTransition(QList<QAbstractState*>() << target) {} protected: void onTransition(QEvent *) {} - bool eventTest(QEvent *) const { return true; } + bool eventTest(QEvent *) { return true; } }; } // namespace diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 046fbb4..65f49ae 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -1124,7 +1124,7 @@ public: InitialTransition(QAbstractState *target) : QAbstractTransition(QList<QAbstractState*>() << target) {} protected: - virtual bool eventTest(QEvent *) const { return true; } + virtual bool eventTest(QEvent *) { return true; } virtual void onTransition(QEvent *) {} }; |