From ffaa1281d492d9ab1b0301944c12301dacff55cb Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 10 Aug 2023 11:48:05 +0200 Subject: [PATCH] Clear the _X version of alongside the enum deprecator When QT_NO_DEPRECATED_WARNINGS is defined, we undefine Q_DECL_ENUMERATOR_DEPRECATED as it's used raw (rather than via an intermediary or version-variant). The same is true of its _X() variant, so do the same for this - which involves redefining it to a still function-like macro, so that its parameter gets ignored. This amends commit 59b03992ab332a320ac7cff7c5b099b2c30e14b2 (and shall get conflicts on older branches, before the defines in question moved to qtdeprecationmarkers.h in 6.5). Pick-to: 5.15 6.2 6.5 6.6 Change-Id: If85c135cddbb33e93cb90f400af123c74e0298ac Reviewed-by: Ivan Solovev --- src/corelib/global/qtdeprecationmarkers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/global/qtdeprecationmarkers.h b/src/corelib/global/qtdeprecationmarkers.h index d283954167..a480a18eae 100644 --- a/src/corelib/global/qtdeprecationmarkers.h +++ b/src/corelib/global/qtdeprecationmarkers.h @@ -40,6 +40,8 @@ QT_BEGIN_NAMESPACE # define QT_DEPRECATED_CONSTRUCTOR # undef Q_DECL_ENUMERATOR_DEPRECATED # define Q_DECL_ENUMERATOR_DEPRECATED +# undef Q_DECL_ENUMERATOR_DEPRECATED_X +# define Q_DECL_ENUMERATOR_DEPRECATED_X(ignored) #endif // If the deprecated macro is defined, use its value