summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <[email protected]>2022-08-16 12:26:25 +0200
committerIvan Solovev <[email protected]>2022-08-19 23:52:05 +0200
commit3226c82740a7ed73b3d0ca39568d8b1c79500963 (patch)
tree2504c906816e9ff26c65c615fa9e6e9d166508c8
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 <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
-rw-r--r--cmake/QtFlagHandlingHelpers.cmake6
-rw-r--r--qmake/generators/projectgenerator.cpp2
-rw-r--r--src/corelib/global/qglobal.cpp36
-rw-r--r--src/corelib/global/qtdeprecationmarkers.h17
-rw-r--r--tests/auto/corelib/global/qlogging/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/qdir.pro2
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/kernel/qmetatype/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/kernel/qobject/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/kernel/qvariant/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/text/qstring/CMakeLists.txt2
-rw-r--r--tests/auto/gui/kernel/qguiapplication/CMakeLists.txt2
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt2
-rw-r--r--tests/auto/gui/util/qdesktopservices/CMakeLists.txt2
-rw-r--r--tests/auto/other/macnativeevents/CMakeLists.txt2
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt2
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt2
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro2
-rw-r--r--tests/manual/network_stresstest/CMakeLists.txt2
-rw-r--r--tests/manual/network_stresstest/network_stresstest.pro2
-rw-r--r--tests/manual/wasm/clipboard/clipboard.pro2
-rw-r--r--tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro2
-rw-r--r--tests/manual/windowchildgeometry/CMakeLists.txt2
-rw-r--r--tests/manual/windowchildgeometry/windowchildgeometry.pro2
-rw-r--r--tests/manual/xembed/gtk-container/gtk-container.pro2
29 files changed, 64 insertions, 49 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index 43371cd176f..34a9bf7e75c 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -180,16 +180,16 @@ function(qt_internal_apply_intel_cet target visibility)
endfunction()
function(qt_internal_library_deprecation_level result)
- # QT_DISABLE_DEPPRECATED_BEFORE controls which version we use as a cut-off
+ # QT_DISABLE_DEPRECATED_UP_TO controls which version we use as a cut-off
# compiling in to the library. E.g. if it is set to QT_VERSION then no
# code which was deprecated before QT_VERSION will be compiled in.
if(WIN32)
# On Windows, due to the way DLLs work, we need to export all functions,
# including the inlines
- list(APPEND deprecations "QT_DISABLE_DEPRECATED_BEFORE=0x040800")
+ list(APPEND deprecations "QT_DISABLE_DEPRECATED_UP_TO=0x040800")
else()
# On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
- list(APPEND deprecations "QT_DISABLE_DEPRECATED_BEFORE=0x050000")
+ list(APPEND deprecations "QT_DISABLE_DEPRECATED_UP_TO=0x050000")
endif()
# QT_DEPRECATED_WARNINGS_SINCE controls the upper-bound of deprecation
# warnings that are emitted. E.g. if it is set to 7.0 then all deprecations
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp
index 730e16fdaf5..8e9e8cd37fd 100644
--- a/qmake/generators/projectgenerator.cpp
+++ b/qmake/generators/projectgenerator.cpp
@@ -321,7 +321,7 @@ ProjectGenerator::writeMakefile(QTextStream &t)
"# Please consult the documentation of the deprecated API in order to know\n"
"# how to port your code away from it.\n"
"# You can also select to disable deprecated APIs only up to a certain version of Qt.\n"
- "#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0\n\n";
+ "#DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x060000 # disables all APIs deprecated in Qt 6.0.0 and earlier\n\n";
t << "# Input" << "\n";
t << getWritableVar("HEADERS")
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 5d9660830ef..bc41309c575 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1527,23 +1527,33 @@ bool qSharedBuild() noexcept
*/
/*!
- \macro QT_DISABLE_DEPRECATED_BEFORE
- \relates <QtGlobal>
+ \macro QT_DISABLE_DEPRECATED_BEFORE
+ \relates <QtGlobal>
+ \deprecated [6.5] Use QT_DISABLE_DEPRECATED_UP_TO instead
+
+ \sa QT_DISABLE_DEPRECATED_UP_TO
+*/
- This macro can be defined in the project file to disable functions deprecated in
- a specified version of Qt or any earlier version. The default version number is 5.0,
- meaning that functions deprecated in or before Qt 5.0 will not be included.
+/*!
+ \macro QT_DISABLE_DEPRECATED_UP_TO
+ \relates <QtGlobal>
- For instance, when preparing to upgrade to Qt 6.3, setting
- \c{QT_DISABLE_DEPRECATED_BEFORE=0x0602ff} will disable functions deprecated in
- Qt 6.2 and earlier, making it easy to find changes worth making before the
- upgrade. In any release, set \c{QT_DISABLE_DEPRECATED_BEFORE=0x000000} to
- enable all functions, including the ones deprecated in Qt 5.0 (although most
- of those have by now been removed entirely).
+ This macro can be defined in the project file to disable functions
+ deprecated in a specified version of Qt or any earlier version. The default
+ version number is 5.0, meaning that functions deprecated in or before
+ Qt 5.0 will not be included.
- \sa QT_DEPRECATED_WARNINGS
-*/
+ For instance, when preparing to upgrade to Qt 6.3, after eliminating all
+ deprecation warnings, you can set \c{QT_DISABLE_DEPRECATED_UP_TO=0x060300}
+ to exclude from your builds the Qt APIs you no longer use. In your own
+ project's build configuration, this will ensure that anyone adding new calls
+ to the deprecated APIs will know about it right away. If you also build Qt
+ for yourself, including this define in your build configuration for Qt will
+ make your binaries smaller by leaving out even the implementation of the
+ deprecated APIs.
+ \sa QT_DEPRECATED_WARNINGS, QT_DISABLE_DEPRECATED_BEFORE
+*/
/*!
\macro QT_DEPRECATED_WARNINGS
diff --git a/src/corelib/global/qtdeprecationmarkers.h b/src/corelib/global/qtdeprecationmarkers.h
index 858b00601b3..dc203a1e47b 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
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
index d3cdad95522..1c4d839ffaf 100644
--- a/tests/auto/corelib/global/qlogging/CMakeLists.txt
+++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt
@@ -21,12 +21,12 @@ set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default)
qt_internal_add_test(tst_qlogging SOURCES tst_qlogging.cpp
DEFINES
QT_MESSAGELOGCONTEXT
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
HELPER_BINARY="${CMAKE_CURRENT_BINARY_DIR}/qlogging_helper"
)
qt_internal_add_test(tst_qmessagelogger SOURCES tst_qmessagelogger.cpp
DEFINES
QT_MESSAGELOGCONTEXT
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
)
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt b/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt
index 1bdf3809b24..4cc6a768252 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt
+++ b/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt
@@ -10,7 +10,7 @@
qt_internal_add_executable(qdir
GUI
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/qdir.pro b/tests/auto/corelib/io/qdir/testdir/dir/qdir.pro
index 856d5ea2fbf..0a31ac9675e 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/qdir.pro
+++ b/tests/auto/corelib/io/qdir/testdir/dir/qdir.pro
@@ -1,3 +1,3 @@
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt
index 43776d0166e..aff04a1bd53 100644
--- a/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt
@@ -12,7 +12,7 @@ qt_internal_add_test(tst_qabstractitemmodel
../../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../../other/qabstractitemmodelutils/dynamictreemodel.h
tst_qabstractitemmodel.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
INCLUDE_DIRECTORIES
../../../other/qabstractitemmodelutils
LIBRARIES
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
index fdb3c80aa95..59886edecb9 100644
--- a/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
@@ -11,7 +11,7 @@ qt_internal_add_test(tst_qabstractproxymodel
SOURCES
tst_qabstractproxymodel.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
Qt::Gui
Qt::TestPrivate
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
index 6e93ffb0c58..ded0bdf9582 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
@@ -11,7 +11,7 @@ qt_internal_add_test(tst_qsfpm_recursive
SOURCES
tst_qsortfilterproxymodel_recursive.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
index a176d2b0e7b..5448feb9fbe 100644
--- a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
@@ -44,7 +44,7 @@ qt_internal_add_test(tst_qmetatype
tst_qmetatype.h tst_qmetatype.cpp tst_qmetatype2.cpp
tst_qmetatype3.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
INCLUDE_DIRECTORIES
../../../other/qvariant_common
LIBRARIES
diff --git a/tests/auto/corelib/kernel/qobject/CMakeLists.txt b/tests/auto/corelib/kernel/qobject/CMakeLists.txt
index c49b2139c7a..5a63150c8f1 100644
--- a/tests/auto/corelib/kernel/qobject/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qobject/CMakeLists.txt
@@ -11,7 +11,7 @@ qt_internal_add_test(tst_qobject
SOURCES
tst_qobject.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
Qt::CorePrivate
Qt::Network
diff --git a/tests/auto/corelib/kernel/qvariant/CMakeLists.txt b/tests/auto/corelib/kernel/qvariant/CMakeLists.txt
index 63348aa1ae5..6e260583c71 100644
--- a/tests/auto/corelib/kernel/qvariant/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qvariant/CMakeLists.txt
@@ -17,7 +17,7 @@ qt_internal_add_test(tst_qvariant
SOURCES
tst_qvariant.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
INCLUDE_DIRECTORIES
../../../other/qvariant_common
LIBRARIES
diff --git a/tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt b/tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt
index 87d630c1a6e..297c3985cc7 100644
--- a/tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt
+++ b/tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt
@@ -9,7 +9,7 @@ qt_internal_add_test(tst_qlatin1stringview
SOURCES
tst_qlatin1stringview.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
QT_NO_CAST_TO_ASCII
)
diff --git a/tests/auto/corelib/text/qstring/CMakeLists.txt b/tests/auto/corelib/text/qstring/CMakeLists.txt
index 0f89ad48686..da4951924ad 100644
--- a/tests/auto/corelib/text/qstring/CMakeLists.txt
+++ b/tests/auto/corelib/text/qstring/CMakeLists.txt
@@ -11,7 +11,7 @@ qt_internal_add_test(tst_qstring
SOURCES
tst_qstring.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
index ee763da9779..224ed7960f1 100644
--- a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
@@ -27,7 +27,7 @@ qt_internal_add_test(tst_qguiapplication
../../../corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp ../../../corelib/kernel/qcoreapplication/tst_qcoreapplication.h # special case
tst_qguiapplication.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0x050E00
+ QT_DISABLE_DEPRECATED_UP_TO=0x050E00
QT_QGUIAPPLICATIONTEST=1
INCLUDE_DIRECTORIES
../../../corelib/kernel/qcoreapplication
diff --git a/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
index 7e3b0fd93fd..d624d0a0b5c 100644
--- a/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
+++ b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
@@ -11,7 +11,7 @@ qt_internal_add_test(tst_qmatrixnxn
SOURCES
tst_qmatrixnxn.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/util/qdesktopservices/CMakeLists.txt b/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
index c95af2deb05..aca3360916f 100644
--- a/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
+++ b/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
@@ -11,7 +11,7 @@ qt_internal_add_test(tst_qdesktopservices
SOURCES
tst_qdesktopservices.cpp
DEFINES
- # QT_DISABLE_DEPRECATED_BEFORE=0 # special case
+ # QT_DISABLE_DEPRECATED_UP_TO=0 # special case
LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/other/macnativeevents/CMakeLists.txt b/tests/auto/other/macnativeevents/CMakeLists.txt
index 179c89122e6..5af0c4a3af5 100644
--- a/tests/auto/other/macnativeevents/CMakeLists.txt
+++ b/tests/auto/other/macnativeevents/CMakeLists.txt
@@ -19,7 +19,7 @@ qt_internal_add_test(tst_macnativeevents
qnativeevents_mac.cpp
tst_macnativeevents.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
${FWAppKit}
Qt::Gui
diff --git a/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt b/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt
index 8ae2c3c8fb6..0cf172a9cc4 100644
--- a/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt
+++ b/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt
@@ -11,7 +11,7 @@ qt_internal_add_test(tst_qheaderview
SOURCES
tst_qheaderview.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
Qt::CorePrivate
Qt::Gui
diff --git a/tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt b/tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt
index 014cddad67f..5586e34523f 100644
--- a/tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt
+++ b/tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt
@@ -13,7 +13,7 @@ qt_internal_add_manual_test(qt_on_cocoa
main.mm
rasterwindow.cpp rasterwindow.h
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
${FWAppKit}
Qt::Gui
diff --git a/tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro b/tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro
index 91c4d2c8751..83c8140a312 100644
--- a/tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro
+++ b/tests/manual/cocoa/qt_on_cocoa/qt_on_cocoa.pro
@@ -8,4 +8,4 @@ LIBS += -framework AppKit
QT += gui widgets quick
QT += quick
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0
diff --git a/tests/manual/network_stresstest/CMakeLists.txt b/tests/manual/network_stresstest/CMakeLists.txt
index 440ac9d33b5..30c70611a00 100644
--- a/tests/manual/network_stresstest/CMakeLists.txt
+++ b/tests/manual/network_stresstest/CMakeLists.txt
@@ -12,7 +12,7 @@ qt_internal_add_manual_test(tst_network_stresstest
minihttpserver.cpp minihttpserver.h
tst_network_stresstest.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
LIBRARIES
Qt::CorePrivate
Qt::NetworkPrivate
diff --git a/tests/manual/network_stresstest/network_stresstest.pro b/tests/manual/network_stresstest/network_stresstest.pro
index cefb0640208..1b7b9a4dffe 100644
--- a/tests/manual/network_stresstest/network_stresstest.pro
+++ b/tests/manual/network_stresstest/network_stresstest.pro
@@ -11,4 +11,4 @@ HEADERS += \
RESOURCES += wwwfiles.qrc
QMAKE_RESOURCE_FLAGS += -no-compress
LIBS += $$QMAKE_LIBS_NETWORK
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0
diff --git a/tests/manual/wasm/clipboard/clipboard.pro b/tests/manual/wasm/clipboard/clipboard.pro
index 32860492259..cffce46997a 100644
--- a/tests/manual/wasm/clipboard/clipboard.pro
+++ b/tests/manual/wasm/clipboard/clipboard.pro
@@ -6,7 +6,7 @@ CONFIG += c++11
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+#DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x060000 # disables all APIs deprecated in Qt 6.0.0 and earlier
SOURCES += \
main.cpp \
diff --git a/tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro b/tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro
index 408dab6482f..d5dbe729b99 100644
--- a/tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro
+++ b/tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro
@@ -18,7 +18,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+#DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x060000 # disables all APIs deprecated in Qt 6.0.0 and earlier
SOURCES += \
diff --git a/tests/manual/windowchildgeometry/CMakeLists.txt b/tests/manual/windowchildgeometry/CMakeLists.txt
index b31f7d88f21..0cb41969960 100644
--- a/tests/manual/windowchildgeometry/CMakeLists.txt
+++ b/tests/manual/windowchildgeometry/CMakeLists.txt
@@ -14,7 +14,7 @@ qt_internal_add_manual_test(windowchildgeometry
controllerwidget.cpp controllerwidget.h
main.cpp
DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
+ QT_DISABLE_DEPRECATED_UP_TO=0
INCLUDE_DIRECTORIES
../windowflags
LIBRARIES
diff --git a/tests/manual/windowchildgeometry/windowchildgeometry.pro b/tests/manual/windowchildgeometry/windowchildgeometry.pro
index 7722547ce7c..19207232ae5 100644
--- a/tests/manual/windowchildgeometry/windowchildgeometry.pro
+++ b/tests/manual/windowchildgeometry/windowchildgeometry.pro
@@ -6,4 +6,4 @@ INCLUDEPATH += ../windowflags
SOURCES += $$PWD/main.cpp controllerwidget.cpp ../windowflags/controls.cpp
HEADERS += controllerwidget.h ../windowflags/controls.h
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0
diff --git a/tests/manual/xembed/gtk-container/gtk-container.pro b/tests/manual/xembed/gtk-container/gtk-container.pro
index 5b4b826315c..e98f1d6cfa3 100644
--- a/tests/manual/xembed/gtk-container/gtk-container.pro
+++ b/tests/manual/xembed/gtk-container/gtk-container.pro
@@ -10,7 +10,7 @@ QMAKE_USE += gtk3
# Please consult the documentation of the deprecated API in order to know
# how to port your code away from it.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
-#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+#DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x060000 # disables all APIs deprecated in Qt 6.0.0 and earlier
# Input
SOURCES += gtk-container.cpp