summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-05 08:58:48 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-05 08:58:48 +0200
commit69ef0481fc22ec3f0d7fa220a47a27fecf76a710 (patch)
treef6d96cc257fcb27e12151f079c583251df4c4720 /src/corelib/io
parentdbfd7f304c4d91096e104ec2383d92a37502d836 (diff)
parent91a2c8630b2204831566ab8e523c747f9d8ec927 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I6f3878b204464313aa2f9d988d3b35121d4d9867
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qurl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index fd2127bce3..b79ec78aa9 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3172,8 +3172,8 @@ QUrl QUrl::resolved(const QUrl &relative) const
if (!relative.d) return *this;
QUrl t;
- // be non strict and allow scheme in relative url
- if (!relative.d->scheme.isEmpty() && relative.d->scheme != d->scheme) {
+ // Compatibility hack (mostly for qtdeclarative) : treat "file:relative.txt" as relative even though QUrl::isRelative() says false
+ if (!relative.d->scheme.isEmpty() && (!relative.isLocalFile() || QDir::isAbsolutePath(relative.d->path))) {
t = relative;
t.detach();
} else {