summaryrefslogtreecommitdiffstats
path: root/src/network/compat/removed_api.cpp
diff options
context:
space:
mode:
authorMate Barany <mate.barany@qt.io>2024-07-22 16:30:12 +0200
committerMate Barany <mate.barany@qt.io>2024-08-30 19:13:06 +0200
commitf02402044e552f2940d4677039f3d02c41eb27ee (patch)
treecb28528ce7a637660e91906fdecfb7f7660bae94 /src/network/compat/removed_api.cpp
parent40bde8a572bd8ed039d3f5a5ab99b281de7410bd (diff)
Pass QSslError::SslError by value
It is a small and trivially copyable type. As a drive-by, make the operator a hidden friend. Found by an Axivion scan. [ChangeLog][Potentially Source-Incompatible Changes][QtNetwork] Made the QSslError::SslError QDebug operator<< a hidden friend of QSslError. This means the operator is no longer a match for arguments implicitly converting to SslError, only for SslError itself. A backwards-compatible fix is to make the conversion explicit: debug << QSslError::SslError(arg). Task-number: QTBUG-125026 Pick-to: 6.8 Change-Id: I9b6673397b6a26d508783304240c91fa058139bc Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/network/compat/removed_api.cpp')
-rw-r--r--src/network/compat/removed_api.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/network/compat/removed_api.cpp b/src/network/compat/removed_api.cpp
index ceda1175385..f24cb308bd3 100644
--- a/src/network/compat/removed_api.cpp
+++ b/src/network/compat/removed_api.cpp
@@ -63,6 +63,17 @@ QList<QNetworkCookie> QNetworkCookie::parseCookies(const QByteArray &cookieStrin
#endif
#include "qnetworkrequest.h" // inlined API
+#include "qsslerror.h"
+
+#ifndef QT_NO_DEBUG_STREAM
+#if QT_CONFIG(ssl)
+QDebug operator<<(QDebug debug, const QSslError::SslError &error)
+{
+ return print(std::move(debug), error);
+}
+#endif
+#endif
+
// #include "qotherheader.h"
// // implement removed functions from qotherheader.h
// order sections alphabetically