summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-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 71a0228eeb..9cf1be58d8 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3169,8 +3169,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 {