From 4af5f0b983fac067ad66921a68a2bb6de2c9e677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Wed, 7 Dec 2022 16:03:48 +0100 Subject: [PATCH] TLS[openssl]: Bump minimum warning level to Critical on Win/macOS On these platforms there is a platform-native plugin that can be used instead. If, as has happened, a developer uses the OpenSSL backend without OpenSSL being available they may be confused by the output of OpenSSL without it being of any concern. Leave the warning level low on other platforms since they have nothing to fall back to. Pick-to: 6.4.2 6.4 6.2 Change-Id: Ic36a0429a9e8eed728aa59ec9e028626d6579de1 Reviewed-by: Timur Pocheptsov --- src/plugins/tls/openssl/qtlsbackend_openssl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/tls/openssl/qtlsbackend_openssl.cpp b/src/plugins/tls/openssl/qtlsbackend_openssl.cpp index f8c146372aa..5ce5f45a5b0 100644 --- a/src/plugins/tls/openssl/qtlsbackend_openssl.cpp +++ b/src/plugins/tls/openssl/qtlsbackend_openssl.cpp @@ -31,7 +31,13 @@ QT_BEGIN_NAMESPACE using namespace Qt::StringLiterals; -Q_LOGGING_CATEGORY(lcTlsBackend, "qt.tlsbackend.ossl"); +#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) +constexpr auto DefaultWarningLevel = QtCriticalMsg; +#else +constexpr auto DefaultWarningLevel = QtDebugMsg; +#endif + +Q_LOGGING_CATEGORY(lcTlsBackend, "qt.tlsbackend.ossl", DefaultWarningLevel); static void q_loadCiphersForConnection(SSL *connection, QList &ciphers, QList &defaultCiphers)