diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 066052ade9..c224b032aa 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3182,8 +3182,7 @@ QUrl QUrl::resolved(const QUrl &relative) const if (!relative.d) return *this; QUrl t; - // 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))) { + if (!relative.d->scheme.isEmpty()) { t = relative; t.detach(); } else {