diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-10-06 11:36:19 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-10-14 10:52:53 +0000 |
commit | 7fe44d5d3b0ce86e53d00b65f0905c83b2e17586 (patch) | |
tree | e2e26eaa3b1dadfab51eab70cd7ca929bc3a03d8 /tools | |
parent | d21bf21aed0c346b5666725ba52c4424c360c028 (diff) |
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 <erik.verbruggen@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qscxmlc/data.t | 11 | ||||
-rw-r--r-- | tools/qscxmlc/main.cpp | 1 | ||||
-rw-r--r-- | tools/qscxmlc/scxmlcppdumper.cpp | 8 |
3 files changed, 16 insertions, 4 deletions
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 <QCoreApplication> +#include <QStringList> 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<QScxmlExecutableContent::StringId> &namelist, bool autoforward, - const QVector<QScxmlExecutableContent::Param> ¶ms, + const QVector<QScxmlExecutableContent::ParameterInfo> ¶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<QScxmlExecutableContent::StringId> &namelist, bool autoforward, - const QVector<QScxmlExecutableContent::Param> ¶ms, + const QVector<QScxmlExecutableContent::ParameterInfo> ¶ms, QScxmlExecutableContent::ContainerId finalize, const QSharedPointer<DocumentModel::ScxmlDocument> &content) -> int { QString className; |