From d1c31191a08b132b3f85c9d00241b0d2eb75a042 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 17 May 2022 16:00:16 +0200 Subject: De-pessimize QTlsBackendOpenSSL::clearErrorQueue() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't need to format the error messages into a QString just to clear the error queue. Just looping over q_ERR_get_error() does the trick, too, and isn't less readable. Pick-to: 6.3 Change-Id: Idc42f8c4ae4374d952cb357fca6c0fca0e04d086 Reviewed-by: Timur Pocheptsov Reviewed-by: MÃ¥rten Nordheim --- src/plugins/tls/openssl/qtlsbackend_openssl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/tls/openssl/qtlsbackend_openssl.cpp b/src/plugins/tls/openssl/qtlsbackend_openssl.cpp index daadff34ee..ea31086fad 100644 --- a/src/plugins/tls/openssl/qtlsbackend_openssl.cpp +++ b/src/plugins/tls/openssl/qtlsbackend_openssl.cpp @@ -86,8 +86,8 @@ void QTlsBackendOpenSSL::logAndClearErrorQueue() void QTlsBackendOpenSSL::clearErrorQueue() { - const auto errs = getErrorsFromOpenSsl(); - Q_UNUSED(errs); + while (q_ERR_get_error()) + ; } bool QTlsBackendOpenSSL::ensureLibraryLoaded() -- cgit v1.2.3