diff options
author | Peter Hartmann <phartmann@rim.com> | 2012-12-14 18:55:36 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-15 04:43:41 (GMT) |
commit | 21666e3857cc9d4c93c6179490c1df46a795de53 (patch) | |
tree | 1d63c1f1eac3370f66b6c61bf79de6889f6a9399 /src/corelib/io | |
parent | 01a05c104036b11b09ab827847cacb766ee533ad (diff) | |
download | Qt-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.cpp | 5 |
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; } |