Use QUrl::toLocalFile() when decoding a string URL
authorAndrew Knight <andrew.knight@digia.com>
Mon, 17 Mar 2014 22:08:49 +0000 (00:08 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 18 Mar 2014 06:21:57 +0000 (07:21 +0100)
commit3f7951c04ef474f81eda2134b67c4e4020fe39d1
treedb4cb95ef8739f2d97c4e11a25b6dd4979c86b16
parentecd4a9ba23c0c538e73dc4f9e75c4d5361ba4c0e
Use QUrl::toLocalFile() when decoding a string URL

Some percent-decoded characters may still be present in the string URL,
so it is best to use QUrl::toLocalFile() to process the string properly.
This also makes some drive handling "magic" obselete as QUrl already
handles this.

This fixes an issue whereby QML apps residing in local paths requiring
percent-encoded characters (or which import local file URLs with
percent-encoded characters) would fail to load, as the path was passed
to the file system engine without fully decoding the URL.

Change-Id: I8ec2b06f0661e0ac7cc9df79d35ec5cee211f672
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/qqmlfile.cpp
tests/auto/qml/qqmllanguage/data/{subdir}/Test.qml [new file with mode: 0644]
tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp