summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qabstractstate_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2015-06-18 16:45:32 +0200
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2015-07-23 13:29:46 +0000
commit5fd9fe02ff14438a2d0c93789be138a58583dbe8 (patch)
tree4532d254a6ae22834948c61b81c1876d8beb7719 /src/corelib/statemachine/qabstractstate_p.h
parent5329d739eed83cc9f430f9d97652743558ccd146 (diff)
QStateMachine: add defaultTransition in QHistoryState
The history state had the limitation that it was hard (or impossible) to use when more than one default state had to be entered. For example, using it in a parallel state was impossible without ending up in an infinite loop. This patch changes the QHistoryState to only have an initial transition, and the state selection algorithm is changed accordingly. It also brings QStateMachine closer to the SCXML standard. The existing defaultState is implemented on top of the defaultTransition: when used, a new transition, with the default state as its target, is set as the defaultTransition. Task-number: QTBUG-46703 Change-Id: Ifbb44e4f0f26b72e365af4c94753e4483f9850e7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/corelib/statemachine/qabstractstate_p.h')
-rw-r--r--src/corelib/statemachine/qabstractstate_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/statemachine/qabstractstate_p.h b/src/corelib/statemachine/qabstractstate_p.h
index 660371b80c..1eb3cbd420 100644
--- a/src/corelib/statemachine/qabstractstate_p.h
+++ b/src/corelib/statemachine/qabstractstate_p.h
@@ -46,12 +46,13 @@
//
#include <private/qobject_p.h>
+#include <QtCore/qabstractstate.h>
QT_BEGIN_NAMESPACE
class QStateMachine;
-class QAbstractState;
+class QState;
class QAbstractStatePrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QAbstractState)