Add deprecation macros for 6.12 and 6.13

This is required for upcoming changes in qtnetworkauth

Change-Id: I9b0547cacddcee6afc352e124043314b048db692
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
Samuel Gaist 2024-10-13 13:30:13 +02:00
parent 9c159e6843
commit 089f494953
2 changed files with 29 additions and 1 deletions

View File

@ -1568,7 +1568,7 @@ function(qt_internal_library_deprecation_level)
set(QT_DISABLE_DEPRECATED_UP_TO "0x050000")
endif()
elseif(NOT QT_DISABLE_DEPRECATED_UP_TO MATCHES "^0x[0-9][0-9][0-9][0-9][0-9][0-9]$")
message(FATAL_ERROR "Ivalid format of the QT_DISABLE_DEPRECATED_UP_TO macro:"
message(FATAL_ERROR "Invalid format of the QT_DISABLE_DEPRECATED_UP_TO macro:"
" ${QT_DISABLE_DEPRECATED_UP_TO}. The expected format is the hexadecimal number,"
" e.g. 0x060102")
endif()

View File

@ -199,6 +199,22 @@ QT_BEGIN_NAMESPACE
# define QT_DEPRECATED_VERSION_6_11
#endif
#if QT_WARN_DEPRECATED_UP_TO >= QT_VERSION_CHECK(6, 12, 0)
# define QT_DEPRECATED_VERSION_X_6_12(text) QT_DEPRECATED_X(text)
# define QT_DEPRECATED_VERSION_6_12 QT_DEPRECATED
#else
# define QT_DEPRECATED_VERSION_X_6_12(text)
# define QT_DEPRECATED_VERSION_6_12
#endif
#if QT_WARN_DEPRECATED_UP_TO >= QT_VERSION_CHECK(6, 13, 0)
# define QT_DEPRECATED_VERSION_X_6_13(text) QT_DEPRECATED_X(text)
# define QT_DEPRECATED_VERSION_6_13 QT_DEPRECATED
#else
# define QT_DEPRECATED_VERSION_X_6_13(text)
# define QT_DEPRECATED_VERSION_6_13
#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)
@ -307,6 +323,18 @@ QT_BEGIN_NAMESPACE
# define QT_IF_DEPRECATED_SINCE_6_11(whenTrue, whenFalse) whenTrue
#endif
#if QT_DEPRECATED_SINCE(6, 12)
# define QT_IF_DEPRECATED_SINCE_6_12(whenTrue, whenFalse) whenFalse
#else
# define QT_IF_DEPRECATED_SINCE_6_12(whenTrue, whenFalse) whenTrue
#endif
#if QT_DEPRECATED_SINCE(6, 13)
# define QT_IF_DEPRECATED_SINCE_6_13(whenTrue, whenFalse) whenFalse
#else
# define QT_IF_DEPRECATED_SINCE_6_13(whenTrue, whenFalse) whenTrue
#endif
#ifdef __cplusplus
// A tag to help mark stuff deprecated (cf. QStringViewLiteral)
namespace QtPrivate {