Add Q_OS_APPLE define on Apple operating systems
It's quite common that macOS and iOS share backends, for example due to the functionality being part of one of the Apple core frameworks. In this case the support isn't directly tied to the Darwin kernel per se, so let's use a more general define to refer to the union of Apple based features. Pick-to: 6.6 Change-Id: I71cac5ec1d74cd86eba67a64b20846e48c9f05c5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
de3795c2a6
commit
f34c5215f4
@ -50,6 +50,7 @@
|
|||||||
|
|
||||||
#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
|
#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
|
||||||
# include <TargetConditionals.h>
|
# include <TargetConditionals.h>
|
||||||
|
# define Q_OS_APPLE
|
||||||
# if defined(TARGET_OS_MAC) && TARGET_OS_MAC
|
# if defined(TARGET_OS_MAC) && TARGET_OS_MAC
|
||||||
# define Q_OS_DARWIN
|
# define Q_OS_DARWIN
|
||||||
# define Q_OS_BSD4
|
# define Q_OS_BSD4
|
||||||
|
@ -23,6 +23,16 @@
|
|||||||
\relates <QtSystemDetection>
|
\relates <QtSystemDetection>
|
||||||
|
|
||||||
Defined on Darwin-based operating systems such as \macos, iOS, watchOS, and tvOS.
|
Defined on Darwin-based operating systems such as \macos, iOS, watchOS, and tvOS.
|
||||||
|
|
||||||
|
\note Unless you are dealing with code specific to the Darwin kernel,
|
||||||
|
prefer Q_OS_APPLE to refer to the family of Apple operating systems.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\macro Q_OS_APPLE
|
||||||
|
\relates <QtSystemDetection>
|
||||||
|
|
||||||
|
Defined on Apple operating systems such as \macos, iOS, watchOS, and tvOS.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user