From 43d8bf3c28d009caa99591ddb4b4c5f1fc864b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 3 Jun 2025 00:47:34 +0200 Subject: [PATCH] Document QT_WARN_DEPRECATED_UP_TO The default value is 0x070000, via qtdeprecationdefinitions.h Pick-to: 6.9 6.8 Change-Id: I78586231e123321a11d41ec8c1324ab928e5fdc8 Reviewed-by: Ivan Solovev (cherry picked from commit 4d4843df42007cac645ac2ec0caa83602da49a0c) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qtdeprecationmarkers.qdoc | 21 +++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qtdeprecationmarkers.qdoc b/src/corelib/global/qtdeprecationmarkers.qdoc index 5d7517f75ed..1e66ff85b53 100644 --- a/src/corelib/global/qtdeprecationmarkers.qdoc +++ b/src/corelib/global/qtdeprecationmarkers.qdoc @@ -44,7 +44,22 @@ set to the same version as in the user code. That is because in static build the Qt libraries also become a part of the binary. - \sa QT_DEPRECATED_WARNINGS, QT_DISABLE_DEPRECATED_UP_TO + \sa QT_DEPRECATED_WARNINGS, QT_WARN_DEPRECATED_UP_TO +*/ + +/*! + \macro QT_WARN_DEPRECATED_UP_TO + \relates + + This macro can be defined in the project file to disable deprecation + warnings introduced in Qt versions higher than the specified version. + + For instance, when preparing to upgrade to Qt 6.10, if you are not + ready to deal with every single deprecation warnings, you can set + \c{QT_WARN_DEPRECATED_UP_TO=0x060900} to limit the deprecation + warnings to those in 6.9 and earlier. + + \sa QT_DISABLE_DEPRECATED_UP_TO, QT_NO_DEPRECATED_WARNINGS */ /*! @@ -55,7 +70,7 @@ is defined, the compiler will generate warnings if any API declared as deprecated by Qt is used. - \sa QT_DISABLE_DEPRECATED_UP_TO, QT_NO_DEPRECATED_WARNINGS + \sa QT_DISABLE_DEPRECATED_UP_TO, QT_NO_DEPRECATED_WARNINGS, QT_WARN_DEPRECATED_UP_TO */ /*! @@ -66,5 +81,5 @@ This macro can be used to suppress deprecation warnings that would otherwise be generated when using deprecated APIs. - \sa QT_DISABLE_DEPRECATED_UP_TO + \sa QT_DISABLE_DEPRECATED_UP_TO, QT_WARN_DEPRECATED_UP_TO */