summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qtdeprecationmarkers.h
diff options
context:
space:
mode:
authorYuhang Zhao <2546789017@qq.com>2023-02-20 17:06:46 +0800
committerYuhang Zhao <2546789017@qq.com>2023-02-21 17:13:36 +0800
commit016581e1ca8d748e99dea2edfd92ee64b8251ae7 (patch)
tree0ef6545d4f289c59e4ce28b1add8e11f1eb507f5 /src/corelib/global/qtdeprecationmarkers.h
parent3c1bea178c3e23719dd98d931c056e34a680ff3c (diff)
Add missing deprecation guards
The deprecated implementation of QSharedMemory and QSystemSemaphore are not correctly guarded by the deprecation macros, and thus it's causing compilation errors when we disable deprecated code. As a drive-by, change the deprecate version from 6.9 to 6.10 as requested. Change-Id: Icfed181c27248b9e1381101a64523419097dd1da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qtdeprecationmarkers.h')
-rw-r--r--src/corelib/global/qtdeprecationmarkers.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/global/qtdeprecationmarkers.h b/src/corelib/global/qtdeprecationmarkers.h
index e87c860400..d283954167 100644
--- a/src/corelib/global/qtdeprecationmarkers.h
+++ b/src/corelib/global/qtdeprecationmarkers.h
@@ -201,6 +201,14 @@ QT_BEGIN_NAMESPACE
# define QT_DEPRECATED_VERSION_6_9
#endif
+#if QT_WARN_DEPRECATED_UP_TO >= QT_VERSION_CHECK(6, 10, 0)
+# define QT_DEPRECATED_VERSION_X_6_10(text) QT_DEPRECATED_X(text)
+# define QT_DEPRECATED_VERSION_6_10 QT_DEPRECATED
+#else
+# define QT_DEPRECATED_VERSION_X_6_10(text)
+# define QT_DEPRECATED_VERSION_6_10
+#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)
@@ -297,6 +305,12 @@ QT_BEGIN_NAMESPACE
# define QT_IF_DEPRECATED_SINCE_6_9(whenTrue, whenFalse) whenTrue
#endif
+#if QT_DEPRECATED_SINCE(6, 10)
+# define QT_IF_DEPRECATED_SINCE_6_10(whenTrue, whenFalse) whenFalse
+#else
+# define QT_IF_DEPRECATED_SINCE_6_10(whenTrue, whenFalse) whenTrue
+#endif
+
#ifdef __cplusplus
// A tag to help mark stuff deprecated (cf. QStringViewLiteral)
namespace QtPrivate {