summaryrefslogtreecommitdiffstats
path: root/src/plugins/tls/openssl/qsslcontext_openssl.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-05-22 14:56:26 +0200
committerAhmad Samir <a.samirh78@gmail.com>2024-12-03 23:45:55 +0200
commit6212c32f1fa5e86a808713f33b331f2dad113e99 (patch)
treea5cb754822b727b7be6f4c9e258a2ab2be9c0fc4 /src/plugins/tls/openssl/qsslcontext_openssl.cpp
parentf7e8e54d7e6803c91cc453afdfc46f3d0b4da9c2 (diff)
Replace a few toString() or fromUtf8() QString::arg() parameters
...and fromUtf8() format strings. QString::arg() is now available on QUtf8StringView, too and can handle UTF-8 arguments directly. Change-Id: Ifa8b1ea0f41414d15a6919b1967e0a45e4d7929f Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/plugins/tls/openssl/qsslcontext_openssl.cpp')
-rw-r--r--src/plugins/tls/openssl/qsslcontext_openssl.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/tls/openssl/qsslcontext_openssl.cpp b/src/plugins/tls/openssl/qsslcontext_openssl.cpp
index 75c192bd01d..4e141682d5b 100644
--- a/src/plugins/tls/openssl/qsslcontext_openssl.cpp
+++ b/src/plugins/tls/openssl/qsslcontext_openssl.cpp
@@ -772,8 +772,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
if (!i.value().canConvert(QMetaType(QMetaType::QByteArray))) {
sslContext->errorCode = QSslError::UnspecifiedError;
sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("Expecting QByteArray for %1").arg(
- QString::fromUtf8(i.key())));
+ QSslSocket::tr("Expecting QByteArray for %1").arg(i.key()));
return;
}
@@ -786,18 +785,16 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
switch (result) {
case 0:
sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("An error occurred attempting to set %1 to %2").arg(
- QString::fromUtf8(i.key()), QString::fromUtf8(value)));
+ QSslSocket::tr("An error occurred attempting to set %1 to %2")
+ .arg(i.key(), value));
return;
case 1:
sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("Wrong value for %1 (%2)").arg(
- QString::fromUtf8(i.key()), QString::fromUtf8(value)));
+ QSslSocket::tr("Wrong value for %1 (%2)").arg(i.key(), value));
return;
default:
sslContext->errorStr = msgErrorSettingBackendConfig(
- QSslSocket::tr("Unrecognized command %1 = %2").arg(
- QString::fromUtf8(i.key()), QString::fromUtf8(value)));
+ QSslSocket::tr("Unrecognized command %1 = %2").arg(i.key(), value));
return;
}
}