summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@theqtcompany.com>2016-04-14 15:29:36 +0200
committerJarek Kobus <jaroslaw.kobus@theqtcompany.com>2016-04-16 11:15:32 +0000
commit8dee4c71a563c39fb622e054f5cdacdd797f41fb (patch)
treece99c0f9b2f0c3d1e0bc6e2bdaa180cac4247515 /tools
parentb5a89712610785706ce7198e234b10b650e06800 (diff)
Don't generate calls to setInitialState for parallel states
ScxmlVerifier also doesn't allow for it. Change-Id: I303bd6b81b4690acc2e7a2379e07b703e32a7a06 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qscxmlc/scxmlcppdumper.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp
index d78d213..6e1d02c 100644
--- a/tools/qscxmlc/scxmlcppdumper.cpp
+++ b/tools/qscxmlc/scxmlcppdumper.cpp
@@ -356,13 +356,15 @@ protected:
if (!node->id.isEmpty()) {
clazz.init.impl << stateName + QStringLiteral(".setObjectName(string(%1));").arg(addString(node->id));
}
- foreach (AbstractState *initialState, node->initialStates) {
- clazz.init.impl << stateName + QStringLiteral(".setInitialState(&")
- + mangledName(initialState, StateName)
- + QStringLiteral(");");
- }
if (node->type == State::Parallel) {
clazz.init.impl << stateName + QStringLiteral(".setChildMode(QState::ParallelStates);");
+ } else {
+ foreach (AbstractState *initialState, node->initialStates) {
+ clazz.init.impl << stateName + QStringLiteral(".setInitialState(&")
+ + mangledName(initialState, StateName)
+ + QStringLiteral(");");
+ }
+
}
if (!node->id.isEmpty()) {
clazz.init.impl << QStringLiteral("QObject::connect(&")