summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <[email protected]>2016-09-22 10:55:20 -0700
committerJake Petroules <[email protected]>2016-09-22 21:55:16 +0000
commited928cee1233aee003610d5fadb56bdaeffbd7b2 (patch)
tree91d6014922ba69a6b7d0042c4286149a288bf206
parent87ae0bc169149be2688f8cdd1f302eba200ae143 (diff)
Suppress deprecated warnings for some QSysInfo members
Otherwise, merely including qsysinfo.h can result in warnings even if the deprecated symbols are not used by the client code (because they are "used" within QSysInfo itself). Task-number: QTBUG-56122 Change-Id: I040b416eeaed5069e0fd6cf5850d0790900a2842 Reviewed-by: Thiago Macieira <[email protected]>
-rw-r--r--src/corelib/global/qsysinfo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h
index cdc186cdcd5..5ec55d467c2 100644
--- a/src/corelib/global/qsysinfo.h
+++ b/src/corelib/global/qsysinfo.h
@@ -118,6 +118,11 @@ public:
WV_CE_6 = 0x0400,
WV_CE_based = 0x0f00
};
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
+QT_WARNING_DISABLE_CLANG("-Wdeprecated-declarations")
+QT_WARNING_DISABLE_INTEL(1478)
+QT_WARNING_DISABLE_MSVC(4996)
#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN)
QT_DEPRECATED_X("Use QOperatingSystemVersion::current()") static const WinVersion WindowsVersion;
QT_DEPRECATED_X("Use QOperatingSystemVersion::current()") static WinVersion windowsVersion();
@@ -125,6 +130,7 @@ public:
QT_DEPRECATED_X("Use QOperatingSystemVersion::current()") static const WinVersion WindowsVersion = WV_None;
QT_DEPRECATED_X("Use QOperatingSystemVersion::current()") static WinVersion windowsVersion() { return WV_None; }
#endif
+QT_WARNING_POP
#define Q_MV_OSX(major, minor) (major == 10 ? minor + 2 : (major == 9 ? 1 : 0))
#define Q_MV_IOS(major, minor) (QSysInfo::MV_IOS | major << 4 | minor)
@@ -199,6 +205,11 @@ public:
MV_WATCHOS_2_2 = Q_MV_WATCHOS(2, 2),
MV_WATCHOS_3_0 = Q_MV_WATCHOS(3, 0)
};
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
+QT_WARNING_DISABLE_CLANG("-Wdeprecated-declarations")
+QT_WARNING_DISABLE_INTEL(1478)
+QT_WARNING_DISABLE_MSVC(4996)
#if defined(Q_OS_MAC)
QT_DEPRECATED_X("Use QOperatingSystemVersion::current()") static const MacVersion MacintoshVersion;
QT_DEPRECATED_X("Use QOperatingSystemVersion::current()") static MacVersion macVersion();
@@ -206,6 +217,7 @@ public:
QT_DEPRECATED_X("Use QOperatingSystemVersion::current()") static const MacVersion MacintoshVersion = MV_None;
QT_DEPRECATED_X("Use QOperatingSystemVersion::current()") static MacVersion macVersion() { return MV_None; }
#endif
+QT_WARNING_POP
#endif // QT_DEPRECATED_SINCE(5, 9)
static QString buildCpuArchitecture();