From eb8216dd4a4ede2b11340475ef3daac3f43c7ba1 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 1 Jul 2013 09:12:57 -0400 Subject: Add Q_OS_OSX and update the documentation to reflect usage intent. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7f089109d7357995b65f6a012f705a6c3cac12ff Reviewed-by: Tor Arne Vestbø Reviewed-by: Gabriel de Dietrich --- src/corelib/global/qglobal.cpp | 10 ++++++---- src/corelib/global/qsystemdetection.h | 11 ++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index c085dbaa4d..067154033c 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -934,7 +934,7 @@ bool qSharedBuild() Q_DECL_NOTHROW \endlist Some constants are defined only on certain platforms. You can use - the preprocessor symbols Q_OS_WIN and Q_OS_MACX to test that + the preprocessor symbols Q_OS_WIN and Q_OS_OSX to test that the application is compiled under Windows or OS X. \sa QLibraryInfo @@ -1077,18 +1077,20 @@ bool qSharedBuild() Q_DECL_NOTHROW \macro Q_OS_DARWIN \relates - Defined on Darwin OS (synonym for Q_OS_MAC). + Defined on Darwin-based operating systems such as OS X and iOS, + including any open source version(s) of Darwin. */ /*! \macro Q_OS_MAC \relates - Defined on OS X and iOS (synonym for Q_OS_DARWIN). + Defined on Darwin-based operating systems distributed by Apple, which + currently includes OS X and iOS, but not the open source version. */ /*! - \macro Q_OS_MACX + \macro Q_OS_OSX \relates Defined on OS X. diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index cb55fa808b..5e68226b60 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -49,9 +49,9 @@ /* The operating system, must be one of: (Q_OS_x) - DARWIN - Darwin OS (synonym for Q_OS_MAC) - MAC - OS X or iOS (synonym for Q_OS_DARWIN) - MACX - OS X + DARWIN - Any Darwin system + MAC - OS X and iOS + OSX - OS X IOS - iOS MSDOS - MS-DOS and Windows OS2 - OS/2 @@ -175,8 +175,9 @@ # include # if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE # define Q_OS_IOS -# else -# define Q_OS_MACX +# elif defined(TARGET_OS_MAC) && TARGET_OS_MAC +# define Q_OS_OSX +# define Q_OS_MACX // compatibility synonym # endif #endif -- cgit v1.2.3