Resolve example qml file paths relative to the executable path.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Tue, 19 Jun 2012 07:06:22 +0000 (17:06 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 20 Jun 2012 05:45:20 +0000 (07:45 +0200)
Task-number: QTBUG-26202
Change-Id: I0ef9d2aa2248c8ddfd61afcd8bca731325f8d239
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
examples/shared/shared.h

index e6d0130..72157e0 100644 (file)
@@ -43,7 +43,7 @@
 {\
     QGuiApplication app(argc,argv);\
     QQuickView view;\
-    view.setSource(QUrl::fromLocalFile(#NAME ".qml"));\
+    view.setSource(QUrl::fromLocalFile(QCoreApplication::applicationDirPath() + QLatin1String("/" #NAME ".qml")));\
     view.show();\
     return app.exec();\
 }