diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-03 09:51:50 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-09-03 09:54:29 (GMT) |
commit | 884f15e533eea8426e71af8ac61e7233357b103c (patch) | |
tree | 5f4dbd7ed864aa17b717d8cf7d89d80b8e1750f8 /src/corelib/io/qurl.cpp | |
parent | 82ff6626eaabbaed83f3cdfc429a2d011701ba03 (diff) | |
download | Qt-884f15e533eea8426e71af8ac61e7233357b103c.zip Qt-884f15e533eea8426e71af8ac61e7233357b103c.tar.gz Qt-884f15e533eea8426e71af8ac61e7233357b103c.tar.bz2 |
Accept empty authority segments in QUrl as different from not-present
See the task for discussion on why this is necessary and why it is
correct from the point of view of the RFC defining URIs.
Task-number: QTBUG-8701
Patch-by: Marja Hassinen
Signed-Off-By: Thiago Macieira
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-rw-r--r-- | src/corelib/io/qurl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 79a8ce4..f57a402 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5610,7 +5610,7 @@ QString QUrl::toString(FormattingOptions options) const if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority) { bool doFileScheme = d->scheme == QLatin1String("file") && ourPath.startsWith(QLatin1Char('/')); QString tmp = d->authority(options); - if (!tmp.isEmpty() || doFileScheme) { + if (!tmp.isNull() || doFileScheme) { if (doFileScheme && !ourPath.startsWith(QLatin1Char('/'))) url += QLatin1Char('/'); url += QLatin1String("//"); |