diff options
author | Christian Strømme <christian.stromme@digia.com> | 2013-06-12 17:49:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-13 14:15:36 +0200 |
commit | ccc41383044f192353d035dd9b94d2b62b0e52ff (patch) | |
tree | 5b68631ceef861dd86b5bde36ad58a99d59cf099 /examples/multimedia/video/qmlvideo | |
parent | fca12620b1e14a5d2daf467f2f8c6eb96714e80a (diff) |
Fix for url bug in the qmlvideo examples.
In the FileBrowser paths where being prepended with file:///, since all
the paths already starts with a forward slash, navigating away from the
initial directory was therefore not possible.
To make the examples work on Android, QT += multimedia was added.
Change-Id: Iff96729d476c4292999b022bdd6d5770b6b011e7
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'examples/multimedia/video/qmlvideo')
-rw-r--r-- | examples/multimedia/video/qmlvideo/main.cpp | 4 | ||||
-rw-r--r-- | examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml | 2 | ||||
-rw-r--r-- | examples/multimedia/video/qmlvideo/qmlvideo.pro | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/multimedia/video/qmlvideo/main.cpp b/examples/multimedia/video/qmlvideo/main.cpp index e44476a15..81c38d240 100644 --- a/examples/multimedia/video/qmlvideo/main.cpp +++ b/examples/multimedia/video/qmlvideo/main.cpp @@ -132,10 +132,10 @@ int main(int argc, char *argv[]) QUrl videoPath; const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation); if (moviesLocation.isEmpty()) { - QUrl appPath(QString("file:///%1").arg(app.applicationDirPath())); + QUrl appPath(QString("file://%1").arg(app.applicationDirPath())); videoPath = appPath.resolved(QUrl("./")); } else - videoPath = QString("file:///%1").arg(moviesLocation.first()); + videoPath = QString("file://%1").arg(moviesLocation.first()); viewer.rootContext()->setContextProperty("videoPath", videoPath); QMetaObject::invokeMethod(rootObject, "init"); diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml index 04f1092f4..18b7b0e09 100644 --- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml +++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml @@ -101,7 +101,7 @@ Rectangle { Rectangle { id: wrapper function launch() { - var path = "file:///" + filePath; + var path = "file://" + filePath; if (folders.isFolder(index)) down(path); else diff --git a/examples/multimedia/video/qmlvideo/qmlvideo.pro b/examples/multimedia/video/qmlvideo/qmlvideo.pro index 3ea513d3a..26865c59a 100644 --- a/examples/multimedia/video/qmlvideo/qmlvideo.pro +++ b/examples/multimedia/video/qmlvideo/qmlvideo.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = qmlvideo -QT += quick +QT += quick multimedia LOCAL_SOURCES = main.cpp LOCAL_HEADERS = trace.h |