summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 43371cd176..34a9bf7e75 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 730e16fdaf..8e9e8cd37f 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 5d9660830e..bc41309c57 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 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
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
index d3cdad9552..1c4d839ffa 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 1bdf3809b2..4cc6a76825 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 856d5ea2fb..0a31ac9675 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 43776d0166..aff04a1bd5 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 fdb3c80aa9..59886edecb 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 6e93ffb0c5..ded0bdf958 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 a176d2b0e7..5448feb9fb 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 c49b2139c7..5a63150c8f 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 63348aa1ae..6e260583c7 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 87d630c1a6..297c3985cc 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 0f89ad4868..da4951924a 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 ee763da977..224ed7960f 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 7e3b0fd93f..d624d0a0b5 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 c95af2deb0..aca3360916 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 179c89122e..5af0c4a3af 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 8ae2c3c8fb..0cf172a9cc 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 014cddad67..5586e34523 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 91c4d2c875..83c8140a31 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 440ac9d33b..30c70611a0 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 cefb064020..1b7b9a4dff 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 3286049225..cffce46997 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 408dab6482..d5dbe729b9 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 b31f7d88f2..0cb4196996 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 7722547ce7..19207232ae 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 5b4b826315..e98f1d6cfa 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