aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-06 14:12:51 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-08 09:00:25 +0200
commit2ed0cd0602093d316bfbce6b1f3f8f8bfe026fca (patch)
treebe7ac70188f15c60706c2c05cad9a8917df4d3eb /tools
parent34b6914970958ace37a3654600637b6fd3d2435c (diff)
Fix error reporting in the new object creator
Propagate error conditions from createVMEMetaObjectAndPropertyCache to the caller and properly clean up refcounts (using QQmlRefPointer) Also fixed qmlscene to report errors if create() failed. Change-Id: I75d984798a197c102078e5d5638ed92f167ab49f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlscene/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 244e0af4ac..fcf89afb9f 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -483,6 +483,10 @@ int main(int argc, char ** argv)
}
QObject *topLevel = component->create();
+ if (!topLevel && component->isError()) {
+ qWarning("%s", qPrintable(component->errorString()));
+ return -1;
+ }
QScopedPointer<QQuickWindow> window(qobject_cast<QQuickWindow *>(topLevel));
if (window) {
engine.setIncubationController(window->incubationController());