diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2024-01-30 11:35:31 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2024-02-07 15:02:19 +0100 |
commit | cbc6ee0eb9ef42c7024fa527bb94ac89953709a6 (patch) | |
tree | 62fe8810996741c361523865a8538395bca8ed49 /src/corelib/global/qtdeprecationmarkers.h | |
parent | 0aaf7092cd077eb07e62d3742293f146c65c9630 (diff) |
Deprecate QDataStream::readBytes(char *&, uint &) instead of removing it
We cannot remove the overload using QT_REMOVED_SINCE, because a qint64
lvalue in the new overload will not bind to an uint& parameter, so the
old code would not compile.
Deprecate the old overload, and add a unit-test that makes sure that
it still behaves correctly.
This commit also introduces the new deprecation macros that are
required to do the deprecation in Qt 6.11.
Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
Found in 6.7 API review
Pick-to: 6.7
Change-Id: I02893bfbe040df736f8e746384e0261a0f0041d3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qtdeprecationmarkers.h')
-rw-r--r-- | src/corelib/global/qtdeprecationmarkers.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/global/qtdeprecationmarkers.h b/src/corelib/global/qtdeprecationmarkers.h index a480a18eae..6df5ebce6d 100644 --- a/src/corelib/global/qtdeprecationmarkers.h +++ b/src/corelib/global/qtdeprecationmarkers.h @@ -211,6 +211,14 @@ QT_BEGIN_NAMESPACE # define QT_DEPRECATED_VERSION_6_10 #endif +#if QT_WARN_DEPRECATED_UP_TO >= QT_VERSION_CHECK(6, 11, 0) +# define QT_DEPRECATED_VERSION_X_6_11(text) QT_DEPRECATED_X(text) +# define QT_DEPRECATED_VERSION_6_11 QT_DEPRECATED +#else +# define QT_DEPRECATED_VERSION_X_6_11(text) +# define QT_DEPRECATED_VERSION_6_11 +#endif + #define QT_DEPRECATED_VERSION_X_5(minor, text) QT_DEPRECATED_VERSION_X_5_##minor(text) #define QT_DEPRECATED_VERSION_X(major, minor, text) QT_DEPRECATED_VERSION_X_##major##_##minor(text) @@ -313,6 +321,12 @@ QT_BEGIN_NAMESPACE # define QT_IF_DEPRECATED_SINCE_6_10(whenTrue, whenFalse) whenTrue #endif +#if QT_DEPRECATED_SINCE(6, 11) +# define QT_IF_DEPRECATED_SINCE_6_11(whenTrue, whenFalse) whenFalse +#else +# define QT_IF_DEPRECATED_SINCE_6_11(whenTrue, whenFalse) whenTrue +#endif + #ifdef __cplusplus // A tag to help mark stuff deprecated (cf. QStringViewLiteral) namespace QtPrivate { |