diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-28 13:03:24 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-28 10:26:14 +0000 |
commit | 584ce7d707b26805f10261b183d45ba54194409f (patch) | |
tree | de20e18822ab8e1bef5d49a1ab395c91d7439638 /examples/quick/calendar/main.cpp | |
parent | cdcdbff1c52848e29a837a85b2c70db84a120499 (diff) |
Make examples return -1 on load failures.
Avoid hanging processes and empty windows in case some module is not
installed.
Change-Id: I26c0b0fafc87ae17719850ad06f13c946f099dd9
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'examples/quick/calendar/main.cpp')
-rw-r--r-- | examples/quick/calendar/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/quick/calendar/main.cpp b/examples/quick/calendar/main.cpp index 1d739add..651a51ec 100644 --- a/examples/quick/calendar/main.cpp +++ b/examples/quick/calendar/main.cpp @@ -225,6 +225,8 @@ int main(int argc, char *argv[]) qmlRegisterType<SqlEventModel>("io.qt.examples.calendar", 1, 0, "SqlEventModel"); QQmlApplicationEngine engine; engine.load(QUrl("qrc:/main.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } |