summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@rim.com>2012-12-14 18:55:36 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-15 04:43:41 (GMT)
commit21666e3857cc9d4c93c6179490c1df46a795de53 (patch)
tree1d63c1f1eac3370f66b6c61bf79de6889f6a9399 /src/corelib/io
parent01a05c104036b11b09ab827847cacb766ee533ad (diff)
downloadQt-21666e3857cc9d4c93c6179490c1df46a795de53.zip
Qt-21666e3857cc9d4c93c6179490c1df46a795de53.tar.gz
Qt-21666e3857cc9d4c93c6179490c1df46a795de53.tar.bz2
QUrl: make sure setAuthority is consistent with setHost
... which is important for an empty but non-null authority. In Qt5 this is already working. Change-Id: I7d389037f71320c6f06897b220633311c3611eea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qurl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 9bb411d..8aaf0e0 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3574,7 +3574,10 @@ void QUrlPrivate::setAuthority(const QString &auth)
isHostValid = true;
if (auth.isEmpty()) {
setUserInfo(QString());
- host.clear();
+ if (auth.isNull())
+ host.clear();
+ else
+ host = QLatin1String("");
port = -1;
return;
}