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 59b03992ab (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 <ivan.solovev@qt.io>
This commit is contained in:
Edward Welbourne 2023-08-10 11:48:05 +02:00
parent b67ebbe3a0
commit ffaa1281d4

View File

@ -40,6 +40,8 @@ QT_BEGIN_NAMESPACE
# define QT_DEPRECATED_CONSTRUCTOR # define QT_DEPRECATED_CONSTRUCTOR
# undef Q_DECL_ENUMERATOR_DEPRECATED # undef Q_DECL_ENUMERATOR_DEPRECATED
# define Q_DECL_ENUMERATOR_DEPRECATED # define Q_DECL_ENUMERATOR_DEPRECATED
# undef Q_DECL_ENUMERATOR_DEPRECATED_X
# define Q_DECL_ENUMERATOR_DEPRECATED_X(ignored)
#endif #endif
// If the deprecated macro is defined, use its value // If the deprecated macro is defined, use its value