From dc6b73390b262b9554599cbf40539763b1280261 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 16 Dec 2016 18:52:18 -0800 Subject: Revert "QUrl::resolved: keep treating file:name.txt as relative for now" This reverts commit 91a2c8630b2204831566ab8e523c747f9d8ec927. We promised in the Qt 5.6.2 changelog to do it in Qt 5.8. It was a temporary compatibility hack. [ChangeLog][QtCore][QUrl] The temporary compatibility in QUrl::resolved() that treated the base URL as relative if its scheme matched the current URL's scheme has been removed. Change-Id: I3e4e5051937c40319d6efffd1490eb9a5a948481 Reviewed-by: David Faure Reviewed-by: Lars Knoll --- src/corelib/io/qurl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/corelib/io/qurl.cpp') 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 { -- cgit v1.2.3