network: use string view types more
Prefer QLatin1StringView overloads Change-Id: I23846761f2c93021de4f6e6b7eba1d74045f89a1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
74fb2519e3
commit
f81e39695a
@ -918,7 +918,7 @@ QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError e
|
||||
case QNetworkReply::SslHandshakeFailedError:
|
||||
errorString = QCoreApplication::translate("QHttp", "SSL handshake failed");
|
||||
if (socket)
|
||||
errorString += QStringLiteral(": ") + socket->errorString();
|
||||
errorString += ": "_L1 + socket->errorString();
|
||||
break;
|
||||
case QNetworkReply::TooManyRedirectsError:
|
||||
errorString = QCoreApplication::translate("QHttp", "Too many redirects");
|
||||
|
@ -291,7 +291,7 @@ void QNetworkReplyWasmImplPrivate::doSendRequest()
|
||||
attr.timeoutMSecs = request.transferTimeout();
|
||||
attr.userData = reinterpret_cast<void *>(this);
|
||||
|
||||
QString dPath = QStringLiteral("/home/web_user/") + request.url().fileName();
|
||||
QString dPath = "/home/web_user/"_L1 + request.url().fileName();
|
||||
QByteArray destinationPath = dPath.toUtf8();
|
||||
attr.destinationPath = destinationPath.constData();
|
||||
|
||||
|
@ -196,7 +196,7 @@ QNetworkInformation *QNetworkInformationPrivate::create(QStringView name)
|
||||
QString listNames;
|
||||
listNames.reserve(8 * dataHolder->factories.count());
|
||||
for (const auto *factory : std::as_const(dataHolder->factories))
|
||||
listNames += factory->name() + QStringLiteral(", ");
|
||||
listNames += factory->name() + ", "_L1;
|
||||
listNames.chop(2);
|
||||
qDebug().nospace() << "Couldn't find " << name << " in list with names: { "
|
||||
<< listNames << " }";
|
||||
|
Loading…
x
Reference in New Issue
Block a user