summaryrefslogtreecommitdiffstats
path: root/src/scxml/qscxmlcompiler.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-09-21 16:33:33 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-10-27 08:28:35 +0000
commit44798eeb43a9a51647fe57a1656072454a4487ee (patch)
treeab43549f9af55ed3b3cb1107bb17c9e35cd189f8 /src/scxml/qscxmlcompiler.cpp
parent2f44d6d3c03a5484ffa542462c7789f593840774 (diff)
Further clean up qscxmlinvokableservice.hv5.8.0-beta1
We can group the various parameters passed around between the factories into a struct and we can move some methods into the private interface. Change-Id: I579ced7d501bdb617d4aefd47ced49746c9a5b94 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/scxml/qscxmlcompiler.cpp')
-rw-r--r--src/scxml/qscxmlcompiler.cpp36
1 files changed, 8 insertions, 28 deletions
diff --git a/src/scxml/qscxmlcompiler.cpp b/src/scxml/qscxmlcompiler.cpp
index 9a3af4a..691f87a 100644
--- a/src/scxml/qscxmlcompiler.cpp
+++ b/src/scxml/qscxmlcompiler.cpp
@@ -50,7 +50,7 @@
#ifndef BUILD_QSCXMLC
#include "qscxmlecmascriptdatamodel.h"
-#include "qscxmlinvokableservice.h"
+#include "qscxmlinvokableservice_p.h"
#include "qscxmldatamodel_p.h"
#include "qscxmlstatemachine_p.h"
#include "qscxmlstatemachine.h"
@@ -476,17 +476,10 @@ private:
class InvokeDynamicScxmlFactory: public QScxmlScxmlServiceFactory
{
public:
- InvokeDynamicScxmlFactory(QScxmlExecutableContent::StringId invokeLocation,
- QScxmlExecutableContent::EvaluatorId srcexpr,
- QScxmlExecutableContent::StringId id,
- QScxmlExecutableContent::StringId idPrefix,
- QScxmlExecutableContent::StringId idlocation,
+ InvokeDynamicScxmlFactory(const QScxmlExecutableContent::InvokeInfo &invokeInfo,
const QVector<QScxmlExecutableContent::StringId> &namelist,
- bool autoforward,
- const QVector<QScxmlExecutableContent::ParameterInfo> &params,
- QScxmlExecutableContent::ContainerId finalize)
- : QScxmlScxmlServiceFactory(invokeLocation, srcexpr, id, idPrefix, idlocation,
- namelist, autoforward, params, finalize)
+ const QVector<QScxmlExecutableContent::ParameterInfo> &params)
+ : QScxmlScxmlServiceFactory(invokeInfo, namelist, params)
{}
void setContent(const QSharedPointer<DocumentModel::ScxmlDocument> &content)
@@ -617,25 +610,12 @@ public:
auto stateMachine = new DynamicStateMachine;
MetaDataInfo info;
DataModelInfo dm;
- auto factoryIdCreator = [stateMachine](QScxmlExecutableContent::StringId invokeLocation,
- QScxmlExecutableContent::EvaluatorId srcexpr,
- QScxmlExecutableContent::StringId id,
- QScxmlExecutableContent::StringId idPrefix,
- QScxmlExecutableContent::StringId idlocation,
+ auto factoryIdCreator = [stateMachine](
+ const QScxmlExecutableContent::InvokeInfo &invokeInfo,
const QVector<QScxmlExecutableContent::StringId> &namelist,
- bool autoforward,
const QVector<QScxmlExecutableContent::ParameterInfo> &params,
- QScxmlExecutableContent::ContainerId finalize,
const QSharedPointer<DocumentModel::ScxmlDocument> &content) -> int {
- auto factory = new InvokeDynamicScxmlFactory(invokeLocation,
- srcexpr,
- id,
- idPrefix,
- idlocation,
- namelist,
- autoforward,
- params,
- finalize);
+ auto factory = new InvokeDynamicScxmlFactory(invokeInfo, namelist, params);
factory->setContent(content);
stateMachine->m_allFactoriesById.append(factory);
return stateMachine->m_allFactoriesById.size() - 1;
@@ -667,7 +647,7 @@ inline QScxmlInvokableService *InvokeDynamicScxmlFactory::invoke(
QScxmlStateMachine *parentStateMachine)
{
bool ok = true;
- auto srcexpr = calculateSrcexpr(parentStateMachine, &ok);
+ auto srcexpr = d->calculateSrcexpr(parentStateMachine, &ok);
if (!ok)
return Q_NULLPTR;