diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-25 09:18:04 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-02-25 08:27:03 +0000 |
commit | f8f1ddfd1258d224afea6c9774e60f76e294032e (patch) | |
tree | d51c7b877169221983ee2d8ad6f84063c94ba617 /examples/scxml/trafficlight-qml-dynamic | |
parent | f4aee241f46aefe6bc775a1d0fc061ff6d088c57 (diff) |
Examples: Return on QML load error.
Prevents hanging processes should an error while loading
QML occur.
Change-Id: I35f68ef170755f075fe95e2e535e363a49c598ee
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'examples/scxml/trafficlight-qml-dynamic')
-rw-r--r-- | examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.cpp b/examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.cpp index d12db7b..b862386 100644 --- a/examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.cpp +++ b/examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.cpp @@ -58,6 +58,8 @@ int main(int argc, char *argv[]) QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:///trafficlight-qml-dynamic.qml"))); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } |