summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTamas Martinec <tamas.martinec@symbio.com>2021-02-04 12:51:42 +0200
committerTamas Martinec <tamas.martinec@symbio.com>2021-02-17 11:32:16 +0200
commit9251d5c76fb57674e8b7d3491f064814c5e08b20 (patch)
tree744c01b46307555d42d22cbedfc46f3b95264ba3 /tools
parentb02f1a30612a015d6b34fe97ad700336ea72e9c2 (diff)
QtScxml: Move ecmascript data model to a plugin
Move qscxmlecmascriptdatamodel to a plugin to remove the build time qml dependency. Task-number: QTBUG-89831 Change-Id: Ibac93cfe39e35c084ed9811a113c88cc660c0436 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
Diffstat (limited to 'tools')
-rw-r--r--tools/qscxmlc/scxmlcppdumper.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp
index 4919604..1240b98 100644
--- a/tools/qscxmlc/scxmlcppdumper.cpp
+++ b/tools/qscxmlc/scxmlcppdumper.cpp
@@ -543,7 +543,7 @@ void CppDumper::writeImplStart()
includes += l("QScxmlNullDataModel");
break;
case DocumentModel::Scxml::JSDataModel:
- includes += l("QScxmlEcmaScriptDataModel");
+ includes += l("QScxmlDataModel");
break;
case DocumentModel::Scxml::CppDataModel:
includes += doc->root->cppDataModelHeaderName;
@@ -584,8 +584,11 @@ void CppDumper::writeImplBody(const GeneratedTableData &table,
dataModelInitialization = l("stateMachine.setDataModel(&dataModel);");
break;
case DocumentModel::Scxml::JSDataModel:
- dataModelField = l("QScxmlEcmaScriptDataModel dataModel;");
- dataModelInitialization = l("stateMachine.setDataModel(&dataModel);");
+ dataModelField = l("QScxmlDataModel *dataModel;");
+ dataModelInitialization = l(
+ " dataModel = QScxmlDataModel::createScxmlDataModel(QStringLiteral(\"ecmascriptdatamodel\"));\n"
+ " stateMachine.setDataModel(dataModel);\n"
+ );
break;
case DocumentModel::Scxml::CppDataModel:
dataModelField = QStringLiteral("// Data model %1 is set from outside.").arg(