summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
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(&")