summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2016-03-10 11:16:52 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2016-03-30 11:56:34 +0000
commit2f2e803aa720e8a60b18eab7e4c41e67cd449457 (patch)
tree6807c3d6a8140e04e70d805f2e046eacda4c846f /tools
parent40914b6c47945dbce11f4993cd0dcf4f640161b3 (diff)
Drop the stateMachine parameter from data model constructors
Instead, make the data model a Q_PROPERTY of state machines. This makes it much easier to independently instantiate state machines and data models from QML and connect them via properties. Change-Id: I62d712dd0ad7817c39432204ced431b8041e442d Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qscxmlc/scxmlcppdumper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp
index b6d3ec9..be123b1 100644
--- a/tools/qscxmlc/scxmlcppdumper.cpp
+++ b/tools/qscxmlc/scxmlcppdumper.cpp
@@ -320,12 +320,12 @@ protected:
case Scxml::NullDataModel:
clazz.classFields << QStringLiteral("QScxmlNullDataModel dataModel;");
clazz.implIncludes << QStringLiteral("QScxmlNullDataModel");
- clazz.constructor.initializer << QStringLiteral("dataModel(&stateMachine)");
+ clazz.init.impl << QStringLiteral("stateMachine.setDataModel(&dataModel);");
break;
case Scxml::JSDataModel:
clazz.classFields << QStringLiteral("QScxmlEcmaScriptDataModel dataModel;");
clazz.implIncludes << QStringLiteral("QScxmlEcmaScriptDataModel");
- clazz.constructor.initializer << QStringLiteral("dataModel(&stateMachine)");
+ clazz.init.impl << QStringLiteral("stateMachine.setDataModel(&dataModel);");
break;
case Scxml::CppDataModel:
clazz.dataModelClassName = node->cppDataModelClassName;