Revert "QUrl::resolved: keep treating file:name.txt as relative for now"
This reverts commit 91a2c8630b. 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 <david.faure@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
bb10
parent
94b136f320
commit
dc6b73390b
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue