Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.2.4, 6.3.1, 6.4.0 Beta2
-
None
-
-
5
-
18f0484a0e (qt/qtbase/dev) 18f0484a0e (qt/tqtc-qtbase/dev)
-
Foundation Sprint 63, Foundation Sprint 64
Description
QT_DISABLE_DEPRECATED_BEFORE, as suggested by the name, is supposed to remove APIs that were deprecated before the specified version.
However in practice it includes the specified version as well.
I'm not sure if that is a bug or a bad naming. In the former case the fix can be as simple as
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index bbff1d2926b..e3f55d8d6f5 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -291,7 +291,7 @@ typedef double qreal; */ #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_BEFORE) #else #define QT_DEPRECATED_SINCE(major, minor) 0 #endif
Otherwise we will probably need to update the name of the macro and corresponding documentation.