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>bb10
parent
3697366642
commit
a75f25a43f
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue