From c9bbc025f01eebd035c757775deaea40eb76ee3e Mon Sep 17 00:00:00 2001 From: JiDe Zhang Date: Fri, 9 Apr 2021 13:10:38 +0800 Subject: [PATCH] Add "QT_DEPRECATED_VERSION_XXX" macros Since 6.3 to 6.6, for which version add "QT_DEPRECATED_VERSION_X_6_" and "QT_DEPRECATED_VERSION_6_" macro. Change-Id: I10c77b1ed436ce3442960f5594f86a3a3be181f2 Reviewed-by: Giuseppe D'Angelo Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 2fadc6d83b..aa9f26e982 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -392,6 +392,38 @@ typedef double qreal; # define QT_DEPRECATED_VERSION_6_2 #endif +#if QT_DEPRECATED_WARNINGS_SINCE >= QT_VERSION_CHECK(6, 3, 0) +# define QT_DEPRECATED_VERSION_X_6_3(text) QT_DEPRECATED_X(text) +# define QT_DEPRECATED_VERSION_6_3 QT_DEPRECATED +#else +# define QT_DEPRECATED_VERSION_X_6_3(text) +# define QT_DEPRECATED_VERSION_6_3 +#endif + +#if QT_DEPRECATED_WARNINGS_SINCE >= QT_VERSION_CHECK(6, 4, 0) +# define QT_DEPRECATED_VERSION_X_6_4(text) QT_DEPRECATED_X(text) +# define QT_DEPRECATED_VERSION_6_4 QT_DEPRECATED +#else +# define QT_DEPRECATED_VERSION_X_6_4(text) +# define QT_DEPRECATED_VERSION_6_4 +#endif + +#if QT_DEPRECATED_WARNINGS_SINCE >= QT_VERSION_CHECK(6, 5, 0) +# define QT_DEPRECATED_VERSION_X_6_5(text) QT_DEPRECATED_X(text) +# define QT_DEPRECATED_VERSION_6_5 QT_DEPRECATED +#else +# define QT_DEPRECATED_VERSION_X_6_5(text) +# define QT_DEPRECATED_VERSION_6_5 +#endif + +#if QT_DEPRECATED_WARNINGS_SINCE >= QT_VERSION_CHECK(6, 6, 0) +# define QT_DEPRECATED_VERSION_X_6_6(text) QT_DEPRECATED_X(text) +# define QT_DEPRECATED_VERSION_6_6 QT_DEPRECATED +#else +# define QT_DEPRECATED_VERSION_X_6_6(text) +# define QT_DEPRECATED_VERSION_6_6 +#endif + #define QT_DEPRECATED_VERSION_X_5(minor, text) QT_DEPRECATED_VERSION_X_5_##minor(text) #define QT_DEPRECATED_VERSION_X(major, minor, text) QT_DEPRECATED_VERSION_X_##major##_##minor(text)