diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-08-05 10:38:25 +0200 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-08-05 10:38:25 +0200 |
commit | 06eab796bafa48c9e1a7e6c389bec84b8f42bd49 (patch) | |
tree | 0db18767a303250e13d8291748595912d73be9e6 /examples/multimedia/video/qmlvideo/main.cpp | |
parent | ab29837c0efd4c07e17bbc8a4e49a592218d924a (diff) | |
parent | 2838a99c5abc78cb6ff1b4d4c5872ea4ddd5147e (diff) |
Merge branch 'stable' into dev
Conflicts:
.qmake.conf
Change-Id: Id3427cb1a80956ba61373313c21b4b9aa007ea54
Diffstat (limited to 'examples/multimedia/video/qmlvideo/main.cpp')
-rw-r--r-- | examples/multimedia/video/qmlvideo/main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/multimedia/video/qmlvideo/main.cpp b/examples/multimedia/video/qmlvideo/main.cpp index 81c38d240..a14684ff7 100644 --- a/examples/multimedia/video/qmlvideo/main.cpp +++ b/examples/multimedia/video/qmlvideo/main.cpp @@ -129,13 +129,11 @@ int main(int argc, char *argv[]) rootObject, SLOT(qmlFramePainted())); #endif - QUrl videoPath; const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation); - if (moviesLocation.isEmpty()) { - QUrl appPath(QString("file://%1").arg(app.applicationDirPath())); - videoPath = appPath.resolved(QUrl("./")); - } else - videoPath = QString("file://%1").arg(moviesLocation.first()); + const QUrl videoPath = + QUrl::fromLocalFile(moviesLocation.isEmpty() ? + app.applicationDirPath() : + moviesLocation.front()); viewer.rootContext()->setContextProperty("videoPath", videoPath); QMetaObject::invokeMethod(rootObject, "init"); |