From c4086d7b7a3b5a06a2faaaf26e2a9f9d6b2918c3 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 11 Apr 2024 11:41:17 +0200 Subject: [PATCH] QPageSize: remove redundant operator== declaration Amends a45a3b1ece490bcae5cccd858dbe11408a19bee0, which added the hidden friend as an inline function, without removing the already existing declaration. Since that declaration was exported, keep it in the ABI via Q_REMOVED_API, and only remove it from the API. Fixes: QTBUG-115583 Pick-to: 6.7 Change-Id: I169b565ed02168248f96c1379f537b90b4ea481c Reviewed-by: Marc Mutz --- src/gui/compat/removed_api.cpp | 11 +++++++++++ src/gui/painting/qpagesize.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/src/gui/compat/removed_api.cpp b/src/gui/compat/removed_api.cpp index 659a27ecb6a..a642c33c428 100644 --- a/src/gui/compat/removed_api.cpp +++ b/src/gui/compat/removed_api.cpp @@ -7,6 +7,17 @@ QT_USE_NAMESPACE +#if QT_GUI_REMOVED_SINCE(6, 4) + +#include "qpagesize.h" // removed duplicate declaration of op== + // (still caused an symbol on some platforms) + +// #include "qotherheader.h" +// // implement removed functions from qotherheader.h +// order sections alphabetically + +#endif // QT_GUI_REMOVED_SINCE(6, 4) + #if QT_GUI_REMOVED_SINCE(6, 6) #include "qpixmapcache.h" // inlined API diff --git a/src/gui/painting/qpagesize.h b/src/gui/painting/qpagesize.h index b3629bb8d2c..221863aad7e 100644 --- a/src/gui/painting/qpagesize.h +++ b/src/gui/painting/qpagesize.h @@ -203,7 +203,9 @@ public: void swap(QPageSize &other) noexcept { d.swap(other.d); } +#if QT_GUI_REMOVED_SINCE(6, 4) friend Q_GUI_EXPORT bool operator==(const QPageSize &lhs, const QPageSize &rhs); +#endif bool isEquivalentTo(const QPageSize &other) const; bool isValid() const;