diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-09-10 00:59:29 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-09-15 07:04:16 +0000 |
commit | 5081fd68870b71ba4f2a31cff475b0c46a75f364 (patch) | |
tree | ab693f4c1c00ef9bd35c2c4c7f6e3d9d4fde6015 /src/corelib/global/qglobal.cpp | |
parent | 5b0f59c73d46bae10c5c22b270c0f7ef6ffff20c (diff) |
Deprecate Q_OS_MAC.
Justification: intuition indicates that Q_OS_MAC refers to OS X. Reality
indicates it refers to OS X, iOS, watchOS, and tvOS. Technical
correctness requires that it match reality. Backwards compatibility
dictates it can't be changed anyways. Conclusion: an extremely confusing
macro that no one knows how to use properly.
When Q_OS_MACX was repurposed for OS X (and later, Q_OS_OSX introduced),
Q_OS_MAC was kept around to allow differentation between Q_OS_DARWIN
(the grandfather OS of everything - OS X, iOS, watchOS, tvOS, and
theoretically "open source Darwin derivative"). However, given that
every attempt at a non-Apple Darwin based operating system has failed
and sees virtually no interest at scale, this distinction is not useful
in Qt for the confusion it causes in return, especially considering that
there are several cases in Qt where Q_OS_MAC should be Q_OS_DARWIN or
vice versa, and sometimes the correct macro is not even entirely clear.
Therefore, Q_OS_MAC can be deprecated. In the extremely unlikely case
that differentiation between Darwin core, and commercial Darwin-based
operating systems from Apple is required, I suggest introducing
Q_OS_APPLE (a superset of Q_OS_DARWIN, and subset of Q_OS_OSX, Q_OS_IOS,
Q_OS_WATCHOS, and Q_OS_TVOS). Until it is needed, Darwin, OS X, iOS,
watchOS, and tvOS defines should be perfectly sufficient for every
real-world use case.
Change-Id: Id6df8c1102010b61cfe001ed41a76809bc166863
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 37a765b40a..3ede935b4b 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1169,19 +1169,10 @@ bool qSharedBuild() Q_DECL_NOTHROW \macro Q_OS_DARWIN \relates <QtGlobal> - Defined on Darwin-based operating systems such as OS X and iOS, - including any open source version(s) of Darwin. + Defined on Darwin-based operating systems such as OS X and iOS. */ /*! - \macro Q_OS_MAC - \relates <QtGlobal> - - Defined on Darwin-based operating systems distributed by Apple, which - currently includes OS X and iOS, but not the open source versions of Darwin. - */ - -/*! \macro Q_OS_OSX \relates <QtGlobal> |