summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorKimmo Kotajärvi <kimmo.kotajarvi@nomovok.com>2010-03-05 16:10:48 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-05 16:10:48 (GMT)
commit413bec8e5d1a60f965abece7f6901fd0a177161d (patch)
tree3d217b6fe9b606d3ee66c46b9ca6a499255acf48 /src/corelib/io
parent14d8e280407989181cc9581803ed1a080414e77b (diff)
downloadQt-413bec8e5d1a60f965abece7f6901fd0a177161d.zip
Qt-413bec8e5d1a60f965abece7f6901fd0a177161d.tar.gz
Qt-413bec8e5d1a60f965abece7f6901fd0a177161d.tar.bz2
Allow empty authority in QUrl::setAuthority as per docs.
Merge-request: 482 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qurl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 626bd3f..a60f206 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3479,8 +3479,12 @@ QString QUrlPrivate::authority(QUrl::FormattingOptions options) const
void QUrlPrivate::setAuthority(const QString &auth)
{
- if (auth.isEmpty())
+ if (auth.isEmpty()) {
+ setUserInfo(QString());
+ host.clear();
+ port = -1;
return;
+ }
// find the port section of the authority by searching from the
// end towards the beginning for numbers until a ':' is reached.