summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qtdeprecationmarkers.h
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-08-16 12:26:25 +0200
committerIvan Solovev <ivan.solovev@qt.io>2022-08-19 23:52:05 +0200
commit3226c82740a7ed73b3d0ca39568d8b1c79500963 (patch)
tree2504c906816e9ff26c65c615fa9e6e9d166508c8 /src/corelib/global/qtdeprecationmarkers.h
parentb9baa42b62b7ae34dabd54592cb12be6e2b18b35 (diff)
Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TO
The new name describes the behavior in a better way. [ChangeLog][Build System] The QT_DISABLE_DEPRECATED_BEFORE macro is renamed to QT_DISABLE_DEPRECATED_UP_TO. The old name is deprecated, but is still recognized if it is defined during configuration and the new name is not defined. Task-number: QTBUG-104944 Change-Id: Ifc34323e0bbd9e3dc2f86c3e80d4d0940ebccbb8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/global/qtdeprecationmarkers.h')
-rw-r--r--src/corelib/global/qtdeprecationmarkers.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/corelib/global/qtdeprecationmarkers.h b/src/corelib/global/qtdeprecationmarkers.h
index 858b00601b..dc203a1e47 100644
--- a/src/corelib/global/qtdeprecationmarkers.h
+++ b/src/corelib/global/qtdeprecationmarkers.h
@@ -36,16 +36,21 @@ QT_BEGIN_NAMESPACE
# define Q_DECL_ENUMERATOR_DEPRECATED
#endif
+// If the deprecated macro is defined, use its value
+#if !defined(QT_DISABLE_DEPRECATED_UP_TO) && defined(QT_DISABLE_DEPRECATED_BEFORE)
+# define QT_DISABLE_DEPRECATED_UP_TO QT_DISABLE_DEPRECATED_BEFORE
+#endif
+
#ifndef QT_DEPRECATED_WARNINGS_SINCE
-# ifdef QT_DISABLE_DEPRECATED_BEFORE
-# define QT_DEPRECATED_WARNINGS_SINCE QT_DISABLE_DEPRECATED_BEFORE
+# ifdef QT_DISABLE_DEPRECATED_UP_TO
+# define QT_DEPRECATED_WARNINGS_SINCE QT_DISABLE_DEPRECATED_UP_TO
# else
# define QT_DEPRECATED_WARNINGS_SINCE QT_VERSION
# endif
#endif
-#ifndef QT_DISABLE_DEPRECATED_BEFORE
-#define QT_DISABLE_DEPRECATED_BEFORE QT_VERSION_CHECK(5, 0, 0)
+#ifndef QT_DISABLE_DEPRECATED_UP_TO
+#define QT_DISABLE_DEPRECATED_UP_TO QT_VERSION_CHECK(5, 0, 0)
#endif
/*
@@ -61,7 +66,7 @@ QT_BEGIN_NAMESPACE
*/
#ifdef QT_DEPRECATED
-#define QT_DEPRECATED_SINCE(major, minor) (QT_VERSION_CHECK(major, minor, 0) > QT_DISABLE_DEPRECATED_BEFORE)
+#define QT_DEPRECATED_SINCE(major, minor) (QT_VERSION_CHECK(major, minor, 0) > QT_DISABLE_DEPRECATED_UP_TO)
#else
#define QT_DEPRECATED_SINCE(major, minor) 0
#endif
@@ -186,7 +191,7 @@ QT_BEGIN_NAMESPACE
/*
QT_IF_DEPRECATED_SINCE(major, minor, whenTrue, whenFalse) expands to
\a whenTrue if the specified (\a major, \a minor) version is less than or
- equal to the deprecation version defined by QT_DISABLE_DEPRECATED_BEFORE,
+ equal to the deprecation version defined by QT_DISABLE_DEPRECATED_UP_TO,
and to \a whenFalse otherwise.
Currently used for QT_INLINE_SINCE(maj, min), but can also be helpful for