summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@theqtcompany.com>2016-02-14 02:00:39 -0800
committerJake Petroules <jake.petroules@theqtcompany.com>2016-02-18 07:38:06 +0000
commitde82352d288475093a7692d8d998e8d6e9769e0e (patch)
treeea41626d0508428321342e2c847dfc01f2aac7ee /src/corelib
parent34472e946a11bf6e06ba9ed7b72f938ea6eede02 (diff)
Wrap legacy APIs in a QT_MAC_DEPLOYMENT_TARGET_BELOW macro.
If the deployment target is OS X >= 10.10 or iOS >= 8.0, we always have the NSProcessInfo API available and do not need to compile-in this code at all. Change-Id: I8470a5be475a82e7b88d62f4558925f62527b6f6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qcore_mac_objc.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm
index 798307f8ab..1a2b047041 100644
--- a/src/corelib/kernel/qcore_mac_objc.mm
+++ b/src/corelib/kernel/qcore_mac_objc.mm
@@ -107,6 +107,7 @@ QAppleOperatingSystemVersion qt_apple_os_version()
// Use temporary variables so we can return 0.0.0 (unknown version)
// in case of an error partway through determining the OS version
qint32 major = 0, minor = 0, patch = 0;
+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_10, __IPHONE_8_0)
#if defined(Q_OS_IOS)
@autoreleasepool {
NSArray *parts = [UIDevice.currentDevice.systemVersion componentsSeparatedByString:@"."];
@@ -130,6 +131,7 @@ QAppleOperatingSystemVersion qt_apple_os_version()
if (pGestalt('sys3', &patch) != 0)
return v;
#endif
+#endif
v.major = major;
v.minor = minor;
v.patch = patch;