Reviewing merge request #482: Allow empty authority in QUrl::setAuthority
Docs at http://doc.trolltech.com/4.5/qurl.html#setAuthority say "The authority of a URL is the combination of user info, a host name and a port. All of these elements are optional; an empty authority is therefore valid." yet empty authority was previously ignored. I made this small change and also added a test.
(Related to http://bugreports.qt.nokia.com/browse/QTBUG-6962)
Commits that would be merged:
Comments
08eaad5 does not look correct to me.
If auth.isEmpty():
–>auth.length() == 0
–>int portIndex = auth.length() – 1;
—>portIndex == -1
—>short c = auth.at(portIndex—).unicode();
—>the argument of QString::at() is -1, which is invalid
Updated setAuthority, now username/password are emptied, host is cleared and port is set to unspecified.
Thanks, merged as 413bec8e5d1a60f965abece7f6901fd0a177161d to 4.7.


Add a new comment:
Login or create an account to post a comment