summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qstatemachine_p.h
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-07-12 03:12:06 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-12 20:38:02 +0200
commitc4cef6fae9f2a55f21fc9517855dfcf659c89081 (patch)
tree6013a60155c3f949d9db4661c9bdcfff5cb4b20b /src/corelib/statemachine/qstatemachine_p.h
parentb76014b8ef3862b4168148cb20e1108d9c0df5f6 (diff)
statemachine: Fix state entry bug for parallel state groups
The SCXML spec had a bug that would cause the initial state of a compound state within a parallel state group to be entered even if the transition specified another (non-initial) state of the compound state as its target. This only happened if the transition had multiple target states. The bug has been fixed in recent revisions of the SCXML spec. This commit implements the fix, which is to walk the ancestors of the transition's target states only after all the target states themselves have been added, so that the default initial states are correctly overridden/ignored. Task-number: QTBUG-25958 Change-Id: Iac532047678c483a4a3996e24dacf30e00f6bbe0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/corelib/statemachine/qstatemachine_p.h')
-rw-r--r--src/corelib/statemachine/qstatemachine_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h
index 423c077a83..113f17f973 100644
--- a/src/corelib/statemachine/qstatemachine_p.h
+++ b/src/corelib/statemachine/qstatemachine_p.h
@@ -150,6 +150,9 @@ public:
void addStatesToEnter(QAbstractState *s, QState *root,
QSet<QAbstractState*> &statesToEnter,
QSet<QAbstractState*> &statesForDefaultEntry);
+ void addAncestorStatesToEnter(QAbstractState *s, QState *root,
+ QSet<QAbstractState*> &statesToEnter,
+ QSet<QAbstractState*> &statesForDefaultEntry);
static QState *toStandardState(QAbstractState *state);
static const QState *toStandardState(const QAbstractState *state);