diff options
Diffstat (limited to 'examples/quick')
| -rw-r--r-- | examples/quick/controls/basiclayouts/src/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/controls/calendar/src/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/controls/filesystembrowser/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/controls/gallery/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/controls/styles/main.cpp | 3 | ||||
| -rw-r--r-- | examples/quick/controls/texteditor/src/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/controls/touch/src/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/controls/uiforms/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/dialogs/systemdialogs/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/extras/dashboard/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/extras/flat/main.cpp | 2 | ||||
| -rw-r--r-- | examples/quick/extras/gallery/main.cpp | 2 |
12 files changed, 24 insertions, 1 deletions
diff --git a/examples/quick/controls/basiclayouts/src/main.cpp b/examples/quick/controls/basiclayouts/src/main.cpp index bb4b3bddb..e66387f7b 100644 --- a/examples/quick/controls/basiclayouts/src/main.cpp +++ b/examples/quick/controls/basiclayouts/src/main.cpp @@ -45,5 +45,7 @@ int main(int argc, char *argv[]) { QtQuickControlsApplication app(argc, argv); QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/controls/calendar/src/main.cpp b/examples/quick/controls/calendar/src/main.cpp index 6b3c058ab..bab7e4b26 100644 --- a/examples/quick/controls/calendar/src/main.cpp +++ b/examples/quick/controls/calendar/src/main.cpp @@ -48,5 +48,7 @@ int main(int argc, char *argv[]) QtQuickControlsApplication app(argc, argv); qmlRegisterType<SqlEventModel>("org.qtproject.examples.calendar", 1, 0, "SqlEventModel"); QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/controls/filesystembrowser/main.cpp b/examples/quick/controls/filesystembrowser/main.cpp index ac24bada8..e9c63c208 100644 --- a/examples/quick/controls/filesystembrowser/main.cpp +++ b/examples/quick/controls/filesystembrowser/main.cpp @@ -143,6 +143,8 @@ int main(int argc, char *argv[]) engine.rootContext()->setContextProperty("fileSystemModel", fsm); engine.rootContext()->setContextProperty("rootPathIndex", fsm->index(fsm->rootPath())); engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/controls/gallery/main.cpp b/examples/quick/controls/gallery/main.cpp index 4c254a4ee..ac3f447d3 100644 --- a/examples/quick/controls/gallery/main.cpp +++ b/examples/quick/controls/gallery/main.cpp @@ -52,5 +52,7 @@ int main(int argc, char *argv[]) QSurfaceFormat::setDefaultFormat(fmt); } QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/controls/styles/main.cpp b/examples/quick/controls/styles/main.cpp index 1f6684a66..55c592e6e 100644 --- a/examples/quick/controls/styles/main.cpp +++ b/examples/quick/controls/styles/main.cpp @@ -47,6 +47,7 @@ int main(int argc, char *argv[]) QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/controls/texteditor/src/main.cpp b/examples/quick/controls/texteditor/src/main.cpp index 160e6a9a1..1ef76e3a0 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(); } diff --git a/examples/quick/controls/touch/src/main.cpp b/examples/quick/controls/touch/src/main.cpp index bb4b3bddb..e66387f7b 100644 --- a/examples/quick/controls/touch/src/main.cpp +++ b/examples/quick/controls/touch/src/main.cpp @@ -45,5 +45,7 @@ int main(int argc, char *argv[]) { QtQuickControlsApplication app(argc, argv); QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/controls/uiforms/main.cpp b/examples/quick/controls/uiforms/main.cpp index de92dd709..6a15842a9 100644 --- a/examples/quick/controls/uiforms/main.cpp +++ b/examples/quick/controls/uiforms/main.cpp @@ -55,5 +55,7 @@ int main(int argc, char *argv[]) qmlRegisterSingletonType(QUrl(QStringLiteral("qrc:/qml/CustomerModel.qml")), "io.qt.example", 1, 0, "CustomerModel"); QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/dialogs/systemdialogs/main.cpp b/examples/quick/dialogs/systemdialogs/main.cpp index f83c8c223..5f65ce040 100644 --- a/examples/quick/dialogs/systemdialogs/main.cpp +++ b/examples/quick/dialogs/systemdialogs/main.cpp @@ -53,5 +53,7 @@ int main(int argc, char *argv[]) QSurfaceFormat::setDefaultFormat(fmt); } QQmlApplicationEngine engine(QUrl("qrc:/dialogs/systemdialogs/systemdialogs.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/extras/dashboard/main.cpp b/examples/quick/extras/dashboard/main.cpp index 77a0ada54..74ea07720 100644 --- a/examples/quick/extras/dashboard/main.cpp +++ b/examples/quick/extras/dashboard/main.cpp @@ -51,5 +51,7 @@ int main(int argc, char *argv[]) app.setFont(QFont("DejaVu Sans")); QQmlApplicationEngine engine(QUrl("qrc:/qml/dashboard.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/extras/flat/main.cpp b/examples/quick/extras/flat/main.cpp index 1012fa4e9..8faafdca7 100644 --- a/examples/quick/extras/flat/main.cpp +++ b/examples/quick/extras/flat/main.cpp @@ -51,5 +51,7 @@ int main(int argc, char *argv[]) } QQmlApplicationEngine engine; engine.load(QUrl("qrc:/main.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } diff --git a/examples/quick/extras/gallery/main.cpp b/examples/quick/extras/gallery/main.cpp index 9ba1835ee..1d5d23139 100644 --- a/examples/quick/extras/gallery/main.cpp +++ b/examples/quick/extras/gallery/main.cpp @@ -45,5 +45,7 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine(QUrl("qrc:/qml/gallery.qml")); + if (engine.rootObjects().isEmpty()) + return -1; return app.exec(); } |
