From: Friedemann Kleint Date: Tue, 28 Jul 2015 11:07:29 +0000 (+0200) Subject: Fix shared example header. X-Git-Tag: v5.5.90+alpha1~107 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34f39c8f0dd51f1f62c1d15e6cb466bcc2a7fa90;p=platform%2Fupstream%2Fqtdeclarative.git Fix shared example header. Use new connection syntax and return -1 on load failures, which avoids hanging processes and empty windows in case some module is not installed. Change-Id: I4966c9657b752eee8612fa893a0489bc8a64ccfc Reviewed-by: Shawn Rutledge --- diff --git a/examples/quick/shared/shared.h b/examples/quick/shared/shared.h index 4472b9b..d8fb80b 100644 --- a/examples/quick/shared/shared.h +++ b/examples/quick/shared/shared.h @@ -55,9 +55,11 @@ f.setVersion(4, 4);\ view.setFormat(f);\ }\ - view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit()));\ + view.connect(view.engine(), &QQmlEngine::quit, &app, &QCoreApplication::quit);\ new QQmlFileSelector(view.engine(), &view);\ view.setSource(QUrl("qrc:///" #NAME ".qml")); \ + if (view.status() == QQuickView::Error)\ + return -1;\ view.setResizeMode(QQuickView::SizeRootObjectToView);\ if (QGuiApplication::platformName() == QLatin1String("qnx") || \ QGuiApplication::platformName() == QLatin1String("eglfs")) {\