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:
Anton Kudryavtsev 2023-10-30 16:57:18 +03:00
parent c4f7dba81e
commit 33fec53e55

View File

@ -315,7 +315,7 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair)
QByteArray host;
if (add.setAddress(hostName)) {
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
host = hostName.toLatin1();