summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@rim.com>2012-12-14 17:50:30 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-15 05:43:41 +0100
commit01a05c104036b11b09ab827847cacb766ee533ad (patch)
treeec93031be61c68563b30dc15df1593288ed0ed44 /src/corelib
parent3f13d38b0f0fee28f57c8b5193cbe12511abb042 (diff)
downloadqt4-tools-01a05c104036b11b09ab827847cacb766ee533ad.tar.gz
QUrl: ensure toEncoded() matches toString() wrt. empty authority
This was already fixed for toString() with commit 884f15e, this commit also fixes the toEncoded() implementation. In Qt5 this is already working. Task-number: QTBUG-8701 Change-Id: I0c81801e74d97de31632df45e52a25eb037b4710 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qurl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index d3b6f453eb..9bb411d2a4 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3995,7 +3995,7 @@ QByteArray QUrlPrivate::toEncoded(QUrl::FormattingOptions options) const
QString savedHost = host; // pre-validation, may be invalid!
QString auth = authority();
bool doFileScheme = scheme == QLatin1String("file") && encodedPath.startsWith('/');
- if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority && (!auth.isEmpty() || doFileScheme || !savedHost.isEmpty())) {
+ if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority && (!auth.isNull() || doFileScheme || !savedHost.isEmpty())) {
if (doFileScheme && !encodedPath.startsWith('/'))
url += '/';
url += "//";