diff options
author | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-04-23 11:46:02 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-04-23 11:46:02 +0200 |
commit | ad1441fcb1c66ddafd890c1aa22a631d12c4ee0d (patch) | |
tree | 07eb8ddd0b6976d001486ef536906ff1cdf7bdde /tests/auto/qstate | |
parent | 404db2ceac0ad4770c77f42e8f8a9cd003b151a1 (diff) | |
download | qt4-tools-ad1441fcb1c66ddafd890c1aa22a631d12c4ee0d.tar.gz |
Remove API for setting specific restore policies on states. We have no clear
use case for this, so it has been removed. If the requirement arises we can
add it back in later. Since it no longer makes sense to have it in
QAbstractState, the RestorePolicy enum has been moved to QStateMachine.
Diffstat (limited to 'tests/auto/qstate')
-rw-r--r-- | tests/auto/qstate/tst_qstate.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/tests/auto/qstate/tst_qstate.cpp b/tests/auto/qstate/tst_qstate.cpp index f79fcd4aac..f082caf3dd 100644 --- a/tests/auto/qstate/tst_qstate.cpp +++ b/tests/auto/qstate/tst_qstate.cpp @@ -9,9 +9,7 @@ #include "qstate.h" #include "qstatemachine.h" -#include "qactiontransition.h" #include "qsignaltransition.h" -#include "qstateaction.h" // Will try to wait for the condition while allowing event processing #define QTRY_COMPARE(__expr, __expected) \ @@ -45,7 +43,6 @@ private slots: void assignProperty(); void assignPropertyTwice(); void historyInitialState(); - void addEntryAction(); private: bool functionCalled; @@ -214,22 +211,6 @@ public slots: }; -void tst_QState::addEntryAction() -{ - QStateMachine sm; - - TestClass testObject; - - QState *s0 = new QState(sm.rootState()); - s0->addEntryAction(new QStateInvokeMethodAction(&testObject, "slot")); - sm.setInitialState(s0); - - sm.start(); - QCoreApplication::processEvents(); - - QCOMPARE(testObject.called, true); -} - void tst_QState::assignProperty() { QStateMachine machine; @@ -265,11 +246,11 @@ void tst_QState::assignPropertyTwice() QCOMPARE(object->property("fooBar").toInt(), 30); } -class EventTestTransition: public QActionTransition +class EventTestTransition: public QAbstractTransition { public: EventTestTransition(QEvent::Type type, QState *targetState) - : QActionTransition(QList<QAbstractState*>() << targetState), m_type(type) + : QAbstractTransition(QList<QAbstractState*>() << targetState), m_type(type) { } @@ -279,6 +260,8 @@ protected: return e->type() == m_type; } + void onTransition() {} + private: QEvent::Type m_type; |