diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-04-16 13:37:37 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-04-18 11:32:10 +0000 |
commit | a75f25a43fd4bc5dab659dfc8d79a120258cec5f (patch) | |
tree | cef73b7ff114572d8e7a07258e6c07792c9b0239 | |
parent | 3697366642f05dd9239f730b48feea165f411ce6 (diff) |
Fix runtime platform detection on Apple platforms
The watchOS and tvOS platforms also define __IPHONE_OS_VERSION_MIN_REQUIRED
for compatibility, so we need account for that in the ordering of the ifdefs.
Task-number: QTBUG-67534
Change-Id: Id86e684137550533470370ef29c3563d677d5865
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
-rw-r--r-- | src/corelib/kernel/qcore_mac_objc.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm index 24d73fa8be..5ecd86a30e 100644 --- a/src/corelib/kernel/qcore_mac_objc.mm +++ b/src/corelib/kernel/qcore_mac_objc.mm @@ -346,15 +346,15 @@ Qt::Key qt_mac_cocoaKey2QtKey(QChar keyCode) void qt_apple_check_os_version() { -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) - const char *os = "iOS"; - const int version = __IPHONE_OS_VERSION_MIN_REQUIRED; +#if defined(__WATCH_OS_VERSION_MIN_REQUIRED) + const char *os = "watchOS"; + const int version = __WATCH_OS_VERSION_MIN_REQUIRED; #elif defined(__TV_OS_VERSION_MIN_REQUIRED) const char *os = "tvOS"; const int version = __TV_OS_VERSION_MIN_REQUIRED; -#elif defined(__WATCH_OS_VERSION_MIN_REQUIRED) - const char *os = "watchOS"; - const int version = __WATCH_OS_VERSION_MIN_REQUIRED; +#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + const char *os = "iOS"; + const int version = __IPHONE_OS_VERSION_MIN_REQUIRED; #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) const char *os = "macOS"; const int version = __MAC_OS_X_VERSION_MIN_REQUIRED; |