summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstate
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-04-23 09:46:02 (GMT)
committerEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-04-23 09:46:02 (GMT)
commitad1441fcb1c66ddafd890c1aa22a631d12c4ee0d (patch)
tree07eb8ddd0b6976d001486ef536906ff1cdf7bdde /tests/auto/qstate
parent404db2ceac0ad4770c77f42e8f8a9cd003b151a1 (diff)
downloadQt-ad1441fcb1c66ddafd890c1aa22a631d12c4ee0d.zip
Qt-ad1441fcb1c66ddafd890c1aa22a631d12c4ee0d.tar.gz
Qt-ad1441fcb1c66ddafd890c1aa22a631d12c4ee0d.tar.bz2
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.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/tests/auto/qstate/tst_qstate.cpp b/tests/auto/qstate/tst_qstate.cpp
index f79fcd4..f082caf 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;