diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 4b53b7e9f7..2e13e34aa1 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -826,57 +826,6 @@ using namespace Qt::StringLiterals; \sa QSysInfo::buildCpuArchitecture() */ -/*! - \macro QT_DISABLE_DEPRECATED_BEFORE - \relates - \deprecated [6.5] Use QT_DISABLE_DEPRECATED_UP_TO instead - - \sa QT_DISABLE_DEPRECATED_UP_TO -*/ - -/*! - \macro QT_DISABLE_DEPRECATED_UP_TO - \relates - - 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. - - 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 - \relates - - Since Qt 5.13, this macro has no effect. In Qt 5.12 and before, if this macro - is defined, the compiler will generate warnings if any API declared as - deprecated by Qt is used. - - \sa QT_DISABLE_DEPRECATED_BEFORE, QT_NO_DEPRECATED_WARNINGS -*/ - -/*! - \macro QT_NO_DEPRECATED_WARNINGS - \relates - \since 5.13 - - This macro can be used to suppress deprecation warnings that would otherwise - be generated when using deprecated APIs. - - \sa QT_DISABLE_DEPRECATED_BEFORE -*/ - /*! \macro void Q_FALLTHROUGH() \relates diff --git a/src/corelib/global/qtdeprecationmarkers.h b/src/corelib/global/qtdeprecationmarkers.h index e3b17fef28..ee0ec92589 100644 --- a/src/corelib/global/qtdeprecationmarkers.h +++ b/src/corelib/global/qtdeprecationmarkers.h @@ -7,6 +7,11 @@ #include #include +#if 0 +#pragma qt_class(QtDeprecationMarkers) +#pragma qt_sync_stop_processing +#endif + QT_BEGIN_NAMESPACE #if defined(QT_NO_DEPRECATED) diff --git a/src/corelib/global/qtdeprecationmarkers.qdoc b/src/corelib/global/qtdeprecationmarkers.qdoc new file mode 100644 index 0000000000..2dd572533e --- /dev/null +++ b/src/corelib/global/qtdeprecationmarkers.qdoc @@ -0,0 +1,64 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \headerfile + \inmodule QtCore + \title Qt Deprecation Macros + + \brief The header file contains deprecation helper macros. + + The header file declares several macros for disabling deprecated Qt APIs + and enabling/disabling compiler warnings when they are used. +*/ + +/*! + \macro QT_DISABLE_DEPRECATED_BEFORE + \relates + \deprecated [6.5] Use QT_DISABLE_DEPRECATED_UP_TO instead + + \sa QT_DISABLE_DEPRECATED_UP_TO +*/ + +/*! + \macro QT_DISABLE_DEPRECATED_UP_TO + \relates + + 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. + + 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_UP_TO +*/ + +/*! + \macro QT_DEPRECATED_WARNINGS + \relates + + Since Qt 5.13, this macro has no effect. In Qt 5.12 and before, if this macro + 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 +*/ + +/*! + \macro QT_NO_DEPRECATED_WARNINGS + \relates + \since 5.13 + + This macro can be used to suppress deprecation warnings that would otherwise + be generated when using deprecated APIs. + + \sa QT_DISABLE_DEPRECATED_UP_TO +*/