summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2016-08-04 14:16:05 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-08-04 12:24:01 +0000
commit5b9384336c696ed13db8b1077b847bce012c95ef (patch)
tree36cde1fa5334c8de876c70f86e11d0613216632f
parentd7d31d63db5f0029a4a5e24d998601baee8bade0 (diff)
QPlaylistFileParser: fix QUrl::resolved+QUrl::fromLocalFile misuse
QUrl::resolved can be used to resolve relative paths, but not by passing them via QUrl::fromLocalFile (8a33077 in qtbase made QUrl more strict). To resolve both relative and absolute local paths against a local directory, QUrl::fromUserInput(3 args) does the job. Change-Id: Ifc01bbd590978f939f9538e70d12f2f3704d7b5d Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
-rw-r--r--src/multimedia/playback/playlistfileparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multimedia/playback/playlistfileparser.cpp b/src/multimedia/playback/playlistfileparser.cpp
index c7553e16..99ebe6f5 100644
--- a/src/multimedia/playback/playlistfileparser.cpp
+++ b/src/multimedia/playback/playlistfileparser.cpp
@@ -67,7 +67,7 @@ protected:
if (url.scheme().isEmpty()) {
// Resolve it relative to root
if (root.isLocalFile())
- return root.resolved(QUrl::fromLocalFile(line));
+ return QUrl::fromUserInput(line, root.adjusted(QUrl::RemoveFilename).toLocalFile(), QUrl::AssumeLocalFile);
else
return root.resolved(url);
} else if (url.scheme().length() == 1) {