Introduce Q_OS macros for watchOS and tvOS.
As a useful side effect, watchOS and tvOS won't be detected as iOS, leading to another confusing Q_OS_MAC situation. Change-Id: I00fc0c7088dbc091c4638b6937a7b378d7569cec Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
This commit is contained in:
parent
5081fd6887
commit
2d74c00a19
@ -1169,7 +1169,7 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
|||||||
\macro Q_OS_DARWIN
|
\macro Q_OS_DARWIN
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Defined on Darwin-based operating systems such as OS X and iOS.
|
Defined on Darwin-based operating systems such as OS X, iOS, watchOS, and tvOS.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1186,6 +1186,20 @@ bool qSharedBuild() Q_DECL_NOTHROW
|
|||||||
Defined on iOS.
|
Defined on iOS.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\macro Q_OS_WATCHOS
|
||||||
|
\relates <QtGlobal>
|
||||||
|
|
||||||
|
Defined on watchOS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\macro Q_OS_TVOS
|
||||||
|
\relates <QtGlobal>
|
||||||
|
|
||||||
|
Defined on tvOS.
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\macro Q_OS_WIN
|
\macro Q_OS_WIN
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
@ -41,9 +41,11 @@
|
|||||||
/*
|
/*
|
||||||
The operating system, must be one of: (Q_OS_x)
|
The operating system, must be one of: (Q_OS_x)
|
||||||
|
|
||||||
DARWIN - Any Darwin system (OS X, iOS)
|
DARWIN - Any Darwin system (OS X, iOS, watchOS, tvOS)
|
||||||
OSX - OS X
|
OSX - OS X
|
||||||
IOS - iOS
|
IOS - iOS
|
||||||
|
WATCHOS - watchOS
|
||||||
|
TVOS - tvOS
|
||||||
MSDOS - MS-DOS and Windows
|
MSDOS - MS-DOS and Windows
|
||||||
OS2 - OS/2
|
OS2 - OS/2
|
||||||
OS2EMX - XFree86 on OS/2 (not PM)
|
OS2EMX - XFree86 on OS/2 (not PM)
|
||||||
@ -96,7 +98,15 @@
|
|||||||
# define Q_OS_DARWIN32
|
# define Q_OS_DARWIN32
|
||||||
# endif
|
# endif
|
||||||
# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
|
# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
|
||||||
|
# if defined(TARGET_OS_TV) && TARGET_OS_TV
|
||||||
|
# define Q_OS_TVOS
|
||||||
|
# elif defined(TARGET_OS_WATCH) && TARGET_OS_WATCH
|
||||||
|
# define Q_OS_WATCHOS
|
||||||
|
# else
|
||||||
|
# // TARGET_OS_IOS is only available in newer SDKs,
|
||||||
|
# // so assume any other iOS-based platform is iOS for now
|
||||||
# define Q_OS_IOS
|
# define Q_OS_IOS
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
# // there is no "real" OS X define (rdar://22640089),
|
# // there is no "real" OS X define (rdar://22640089),
|
||||||
# // assume any non iOS-based platform is OS X for now
|
# // assume any non iOS-based platform is OS X for now
|
||||||
|
Loading…
Reference in New Issue
Block a user