summaryrefslogtreecommitdiffstats
path: root/tools/qscxmlc/qscxmlc.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@theqtcompany.com>2015-07-29 10:43:41 +0200
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2015-08-11 14:48:06 +0300
commit983374c80c2718f7b79573b18d1a17f90beb8f8e (patch)
treedf694d1368f77b57fb927e1146ee4d7946046e7d /tools/qscxmlc/qscxmlc.cpp
parent29daba1783f60555018637f101a8dde90fcfa9fa (diff)
Move all "construction code" into StateTable::fromFile()
This also takes care of creating the data model (when none is provided) and handles the ownership/lifetime of that data model. Change-Id: Ibb9f829f08e5d848c1aacb21f339d79355f1cdcd Reviewed-by: Jaroslaw Kobus <jaroslaw.kobus@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'tools/qscxmlc/qscxmlc.cpp')
-rw-r--r--tools/qscxmlc/qscxmlc.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/tools/qscxmlc/qscxmlc.cpp b/tools/qscxmlc/qscxmlc.cpp
index f912a79..3055603 100644
--- a/tools/qscxmlc/qscxmlc.cpp
+++ b/tools/qscxmlc/qscxmlc.cpp
@@ -87,17 +87,8 @@ int main(int argc, char *argv[])
parser.setFileName(file.fileName());
parser.parse();
if (!parser.errors().isEmpty()) {
- foreach (const Scxml::ScxmlParser::ErrorMessage &error, parser.errors()) {
- errs << error.fileName
- << QLatin1Char(':')
- << error.line
- << QLatin1Char(':')
- << error.column
- << QStringLiteral(": ")
- << error.severityString()
- << QStringLiteral(": ")
- << error.msg
- << endl;
+ foreach (const Scxml::ScxmlError &error, parser.errors()) {
+ errs << error.toString() << endl;
}
return -7;
}