QUrl::setPort: use the original port number in the error message

Otherwise the error message will always say -1.

Change-Id: I42e7ef1a481840699a8dffff1407eceec1906254
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Thiago Macieira 2015-09-27 12:38:35 -07:00
parent dceb424fe8
commit ab6f941b50

View File

@ -2411,8 +2411,8 @@ void QUrl::setPort(int port)
d->clearError();
if (port < -1 || port > 65535) {
port = -1;
d->setError(QUrlPrivate::InvalidPortError, QString::number(port), 0);
port = -1;
}
d->port = port;