diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-09-20 18:10:22 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-10-14 10:53:05 +0000 |
commit | 1080cf471231fdde6daca775bbf77a04620f89e7 (patch) | |
tree | fbd0a736628b560d15a1f08dba08dafa3b197be7 /tools/qscxmlc/qscxmlc.cpp | |
parent | bde17badd31d4990b1cc57f155c74c62b2ec9c72 (diff) |
Rename QScxmlParser to QScxmlCompiler
It creates an executable representation from an XML description, so
it is a compiler and not merely a parser. The name should reflect this.
Change-Id: I459445706207b3afae64b3f803c9beae83114bb6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tools/qscxmlc/qscxmlc.cpp')
-rw-r--r-- | tools/qscxmlc/qscxmlc.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/qscxmlc/qscxmlc.cpp b/tools/qscxmlc/qscxmlc.cpp index 03edf5c..de97a18 100644 --- a/tools/qscxmlc/qscxmlc.cpp +++ b/tools/qscxmlc/qscxmlc.cpp @@ -26,7 +26,7 @@ ** ****************************************************************************/ -#include <QtScxml/private/qscxmlparser_p.h> +#include <QtScxml/private/qscxmlcompiler_p.h> #include <QtScxml/qscxmltabledata.h> #include "scxmlcppdumper.h" #include "qscxmlc.h" @@ -174,21 +174,21 @@ int run(const QStringList &arguments) } QXmlStreamReader reader(&file); - QScxmlParser parser(&reader); - parser.setFileName(file.fileName()); - parser.parse(); - if (!parser.errors().isEmpty()) { - const auto errors = parser.errors(); + QScxmlCompiler compiler(&reader); + compiler.setFileName(file.fileName()); + compiler.compile(); + if (!compiler.errors().isEmpty()) { + const auto errors = compiler.errors(); for (const QScxmlError &error : errors) { errs << error.toString() << endl; } return ParseError; } - auto mainDoc = QScxmlParserPrivate::get(&parser)->scxmlDocument(); + auto mainDoc = QScxmlCompilerPrivate::get(&compiler)->scxmlDocument(); if (mainDoc == nullptr) { - Q_ASSERT(!parser.errors().isEmpty()); - const auto errors = parser.errors(); + Q_ASSERT(!compiler.errors().isEmpty()); + const auto errors = compiler.errors(); for (const QScxmlError &error : errors) { errs << error.toString() << endl; } |