From 7fe44d5d3b0ce86e53d00b65f0905c83b2e17586 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 6 Oct 2016 11:36:19 +0200 Subject: Simplify qscxmlexecutablecontent.h The only things we actually have to export are a few structs and typedefs. As we have to keep this binary compatible we should strive to make it as simple as possible. Change-Id: I54d365530800c86ecc3d859d6daea94e05b893a0 Reviewed-by: Erik Verbruggen --- tools/qscxmlc/data.t | 11 +++++++++++ tools/qscxmlc/main.cpp | 1 + tools/qscxmlc/scxmlcppdumper.cpp | 8 ++++---- 3 files changed, 16 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/qscxmlc/data.t b/tools/qscxmlc/data.t index da553f4..2c23de0 100644 --- a/tools/qscxmlc/data.t +++ b/tools/qscxmlc/data.t @@ -44,6 +44,17 @@ struct ${classname}::Data: private QScxmlTableData { ${classname} &stateMachine; ${dataModelField} + static QScxmlExecutableContent::ParameterInfo param(QScxmlExecutableContent::StringId name, + QScxmlExecutableContent::EvaluatorId expr, + QScxmlExecutableContent::StringId location) + { + QScxmlExecutableContent::ParameterInfo p; + p.name = name; + p.expr = expr; + p.location = location; + return p; + } + static qint32 theInstructions[]; static QScxmlExecutableContent::StringId dataIds[]; static QScxmlExecutableContent::EvaluatorInfo evaluators[]; diff --git a/tools/qscxmlc/main.cpp b/tools/qscxmlc/main.cpp index b401af8..ccc99ed 100644 --- a/tools/qscxmlc/main.cpp +++ b/tools/qscxmlc/main.cpp @@ -30,6 +30,7 @@ #include "qscxmlc.h" #include +#include int main(int argc, char *argv[]) { diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp index 56133a5..723566f 100644 --- a/tools/qscxmlc/scxmlcppdumper.cpp +++ b/tools/qscxmlc/scxmlcppdumper.cpp @@ -385,7 +385,7 @@ int createFactoryId(QStringList &factories, const QString &className, QScxmlExecutableContent::StringId idlocation, const QVector &namelist, bool autoforward, - const QVector ¶ms, + const QVector ¶ms, QScxmlExecutableContent::ContainerId finalize, bool useCxx11) { @@ -415,13 +415,13 @@ int createFactoryId(QStringList &factories, const QString &className, { QStringList l; for (const auto ¶m : params) { - l += QStringLiteral("QScxmlExecutableContent::Param(%1, %2, %3)") + l += QStringLiteral("param(%1, %2, %3)") .arg(QString::number(param.name), QString::number(param.expr), QString::number(param.location)); } line += QStringLiteral("%1, ").arg( - createVector(QStringLiteral("QScxmlExecutableContent::Param"), l, + createVector(QStringLiteral("QScxmlExecutableContent::ParameterInfo"), l, useCxx11)); } line += QStringLiteral("%1);").arg(finalize); @@ -467,7 +467,7 @@ void CppDumper::dump(TranslationUnit *unit) QScxmlExecutableContent::StringId idlocation, const QVector &namelist, bool autoforward, - const QVector ¶ms, + const QVector ¶ms, QScxmlExecutableContent::ContainerId finalize, const QSharedPointer &content) -> int { QString className; -- cgit v1.2.3