QHttpNetworkConnection: use QSB more
to avoid needless tmp allocation Change-Id: I582f86adbe274b67ddbc7255caea63a39137edcc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
c4f7dba81e
commit
33fec53e55
@ -315,7 +315,7 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair)
|
|||||||
QByteArray host;
|
QByteArray host;
|
||||||
if (add.setAddress(hostName)) {
|
if (add.setAddress(hostName)) {
|
||||||
if (add.protocol() == QAbstractSocket::IPv6Protocol)
|
if (add.protocol() == QAbstractSocket::IPv6Protocol)
|
||||||
host = '[' + hostName.toLatin1() + ']'; //format the ipv6 in the standard way
|
host = (u'[' + hostName + u']').toLatin1(); //format the ipv6 in the standard way
|
||||||
else
|
else
|
||||||
host = hostName.toLatin1();
|
host = hostName.toLatin1();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user