summaryrefslogtreecommitdiffstats
path: root/examples/uml/xmi-read
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-01-17 19:21:49 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-01-17 23:23:32 +0100
commitf7d4a0c067a93bf8fb2a79b90fb41b9f6128c570 (patch)
tree986f12389fb9cc610cca7625e898af9330a6de7f /examples/uml/xmi-read
parent7ff4636b6228e058adffbb79490f805087b7ea82 (diff)
Change QXmiReader to initialize metamodel on demand
Change-Id: I4516ea5dd46e05f0d5ef81479e29a22927544f1a Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'examples/uml/xmi-read')
-rw-r--r--examples/uml/xmi-read/main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/uml/xmi-read/main.cpp b/examples/uml/xmi-read/main.cpp
index 39c16a92..7f2fe7a6 100644
--- a/examples/uml/xmi-read/main.cpp
+++ b/examples/uml/xmi-read/main.cpp
@@ -19,8 +19,14 @@ int main ()
QXmiReader reader;
QWrappedObject *rootElement = reader.readFile(&file);
- qDebug() << "Successfully read object with name" << rootElement->objectName();
-
+ if (rootElement)
+ qDebug() << "Successfully read object with name" << rootElement->objectName();
+ if (reader.errorStrings().size() > 0) {
+ qDebug() << "Errors:";
+ foreach (QString error, reader.errorStrings())
+ qDebug() << "\t" << error;
+ }
+/*
QFile file2("test-out.xmi");
if (!file2.open(QFile::WriteOnly | QFile::Text)) {
@@ -29,5 +35,6 @@ int main ()
}
QXmiWriter writer(rootElement);
writer.writeFile(&file2);
+*/
}