summaryrefslogtreecommitdiff
path: root/examples/quick/controls/texteditor/src/main.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-28 12:54:03 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-25 11:30:42 +0000
commitc4a911e564cfccfcd0c1e98a1baa8c25b91a085b (patch)
tree4ce1b03a301bd6eda59fa648e22639838cc9f5b6 /examples/quick/controls/texteditor/src/main.cpp
parent66b68ed94032e03b7a0ed9d15f72b1fc5e2cb729 (diff)
downloadqtquickcontrols-c4a911e564cfccfcd0c1e98a1baa8c25b91a085b.tar.gz
Make examples return -1 on load failures.
Avoid hanging processes and empty windows in case some module is not installed. Change-Id: Ib220a6251076fd1fdbd126524a723d5c3f94bfb9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'examples/quick/controls/texteditor/src/main.cpp')
-rw-r--r--examples/quick/controls/texteditor/src/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/quick/controls/texteditor/src/main.cpp b/examples/quick/controls/texteditor/src/main.cpp
index 160e6a9a..1ef76e3a 100644
--- a/examples/quick/controls/texteditor/src/main.cpp
+++ b/examples/quick/controls/texteditor/src/main.cpp
@@ -47,5 +47,7 @@ int main(int argc, char *argv[])
QtQuickControlsApplication app(argc, argv);
qmlRegisterType<DocumentHandler>("org.qtproject.example", 1, 0, "DocumentHandler");
QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
return app.exec();
}