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/qml/qmlvideo/FileBrowser.qml | |
parent | ab29837c0efd4c07e17bbc8a4e49a592218d924a (diff) | |
parent | 2838a99c5abc78cb6ff1b4d4c5872ea4ddd5147e (diff) |
Merge branch 'stable' into dev
Conflicts:
.qmake.conf
Change-Id: Id3427cb1a80956ba61373313c21b4b9aa007ea54
Diffstat (limited to 'examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml')
-rw-r--r-- | examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml index 18b7b0e09..b3e82c8d2 100644 --- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml +++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml @@ -101,7 +101,10 @@ Rectangle { Rectangle { id: wrapper function launch() { - var path = "file://" + filePath; + var path = "file://"; + if (filePath.length > 2 && filePath[1] === ':') // Windows drive logic, see QUrl::fromLocalFile() + path += '/'; + path += filePath; if (folders.isFolder(index)) down(path); else @@ -306,7 +309,7 @@ Rectangle { MouseArea { id: upRegion; anchors.centerIn: parent width: 56 height: 56 - onClicked: if (folders.parentFolder != "") up() + onClicked: up() } states: [ State { @@ -352,6 +355,8 @@ Rectangle { function up() { var path = folders.parentFolder; + if (path.toString().length === 0 || path.toString() === 'file:') + return; if (folders == folders1) { view = view2 folders = folders2; |