diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-04-06 12:18:42 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-04-19 07:03:31 +0000 |
commit | f648d720d0c2a5dcef02c10cfe6cfaea717a6cdc (patch) | |
tree | b2ba0cd1b6073b75b2159a05b4744dbb7779c133 /tests | |
parent | 7c4111286b3c1f072a731ae9aa938c9e73b035e7 (diff) |
Allow history states for <scxml>'s "initial" attribute
The standard doesn't seem to prohibit this and QStateMachine can
handle it.
Change-Id: Ia22f564c9657582199c3c67318fafd21ec4a8770
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/compiled/compiled.pro | 3 | ||||
-rw-r--r-- | tests/auto/compiled/initialhistory.scxml | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/compiled/compiled.pro b/tests/auto/compiled/compiled.pro index 53dcd8c..0fd3db9 100644 --- a/tests/auto/compiled/compiled.pro +++ b/tests/auto/compiled/compiled.pro @@ -17,6 +17,7 @@ STATECHARTS = \ statemachineunicodename.scxml \ anonymousstate.scxml \ submachineunicodename.scxml \ - datainnulldatamodel.scxml + datainnulldatamodel.scxml \ + initialhistory.scxml load(qscxmlc) diff --git a/tests/auto/compiled/initialhistory.scxml b/tests/auto/compiled/initialhistory.scxml new file mode 100644 index 0000000..9262e17 --- /dev/null +++ b/tests/auto/compiled/initialhistory.scxml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="h"> + <state id="b"> + <history id="h"> + <transition target="b2"/> + </history> + + <state id="b2"> + <onentry> + <assign location="x" expr="x * 5"/> + <log expr="'b2, x:' + x"/> + </onentry> + </state> + </state> +</scxml> |