From 33fec53e55ccc221773cb1ba24c4c355f834a4f3 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Mon, 30 Oct 2023 16:57:18 +0300 Subject: [PATCH] QHttpNetworkConnection: use QSB more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to avoid needless tmp allocation Change-Id: I582f86adbe274b67ddbc7255caea63a39137edcc Reviewed-by: MÃ¥rten Nordheim --- src/network/access/qhttpnetworkconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 34f21f9ed7c..1f2fb6d03c3 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -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();