diff options
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/archdetect.cpp | 5 | ||||
-rw-r--r-- | src/corelib/global/qglobal.cpp | 37 | ||||
-rw-r--r-- | src/corelib/global/qsysinfo.h | 6 | ||||
-rw-r--r-- | src/corelib/global/qsystemdetection.h | 27 |
4 files changed, 65 insertions, 10 deletions
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp index 8a88c2f5c8..6c1a026fa8 100644 --- a/src/corelib/global/archdetect.cpp +++ b/src/corelib/global/archdetect.cpp @@ -121,7 +121,12 @@ # define ARCH_ABI1 "" #endif #if defined(__ARM_PCS_VFP) || defined(__mips_hard_float) +// Use "-hardfloat" for platforms that usually have no FPUs +// (and for the platforms which had "-hardfloat" before we established the rule) # define ARCH_ABI2 "-hardfloat" +#elif defined(_SOFT_FLOAT) +// Use "-softfloat" for architectures that usually have FPUs +# define ARCH_ABI2 "-softfloat" #else # define ARCH_ABI2 "" #endif diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index ff845ad2f6..678788c2ef 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1196,6 +1196,7 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_10_9 OS X 10.9 \value MV_10_10 OS X 10.10 \value MV_10_11 OS X 10.11 + \value MV_10_12 macOS 10.12 \value MV_Unknown An unknown and currently unsupported platform \value MV_CHEETAH Apple codename for MV_10_0 @@ -1210,6 +1211,7 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_MAVERICKS Apple codename for MV_10_9 \value MV_YOSEMITE Apple codename for MV_10_10 \value MV_ELCAPITAN Apple codename for MV_10_11 + \value MV_SIERRA Apple codename for MV_10_12 \value MV_IOS iOS (any) \value MV_IOS_4_3 iOS 4.3 @@ -1225,6 +1227,10 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_IOS_8_3 iOS 8.3 \value MV_IOS_8_4 iOS 8.4 \value MV_IOS_9_0 iOS 9.0 + \value MV_IOS_9_1 iOS 9.1 + \value MV_IOS_9_2 iOS 9.2 + \value MV_IOS_9_3 iOS 9.3 + \value MV_IOS_10_0 iOS 10.0 \value MV_None Not a Darwin operating system @@ -1239,10 +1245,24 @@ bool qSharedBuild() Q_DECL_NOTHROW */ /*! + \macro Q_OS_MAC + \relates <QtGlobal> + + Deprecated synonym for \c Q_OS_DARWIN. Do not use. + */ + +/*! \macro Q_OS_OSX \relates <QtGlobal> - Defined on OS X. + Deprecated synonym for \c Q_OS_MACOS. Do not use. + */ + +/*! + \macro Q_OS_MACOS + \relates <QtGlobal> + + Defined on macOS. */ /*! @@ -2603,10 +2623,12 @@ QString QSysInfo::kernelVersion() to determine the distribution name and returns that. If determining the distribution name failed, it returns "unknown". - \b{Darwin, OS X, iOS and tvOS note}: this function returns "osx" for OS X + \b{Darwin, OS X, iOS and tvOS note}: this function returns "macos" for macOS systems, "ios" for iOS systems, "tvos" for tvOS systems and "darwin" in case the system could not be determined. + \b{OS X note}: this function returns "osx" for versions of macOS prior to 10.12. + \b{FreeBSD note}: this function returns "debian" for Debian/kFreeBSD and "unknown" otherwise. @@ -2637,8 +2659,11 @@ QString QSysInfo::productType() return QStringLiteral("ios"); #elif defined(Q_OS_TVOS) return QStringLiteral("tvos"); -#elif defined(Q_OS_OSX) - return QStringLiteral("osx"); +#elif defined(Q_OS_MACOS) + const QAppleOperatingSystemVersion version = qt_apple_os_version(); + if (version.major == 10 && version.minor < 12) + return QStringLiteral("osx"); + return QStringLiteral("macos"); #elif defined(Q_OS_DARWIN) return QStringLiteral("darwin"); @@ -2721,7 +2746,7 @@ QString QSysInfo::prettyProductName() return QLatin1String("iOS ") + productVersion(); #elif defined(Q_OS_TVOS) return QLatin1String("tvOS ") + productVersion(); -#elif defined(Q_OS_OSX) +#elif defined(Q_OS_MACOS) const QAppleOperatingSystemVersion version = qt_apple_os_version(); const char *name = osxVer_helper(version); if (name) { @@ -2730,7 +2755,7 @@ QString QSysInfo::prettyProductName() + QLatin1Char('.') + QString::number(version.minor) + QLatin1Char(')'); } else { - return QLatin1String("OS X ") + return QLatin1String("macOS ") + QString::number(version.major) + QLatin1Char('.') + QString::number(version.minor); } diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h index 143e00a4c3..220535bb9d 100644 --- a/src/corelib/global/qsysinfo.h +++ b/src/corelib/global/qsysinfo.h @@ -140,6 +140,7 @@ public: MV_10_9 = Q_MV_OSX(10, 9), MV_10_10 = Q_MV_OSX(10, 10), MV_10_11 = Q_MV_OSX(10, 11), + MV_10_12 = Q_MV_OSX(10, 12), /* codenames */ MV_CHEETAH = MV_10_0, @@ -154,6 +155,7 @@ public: MV_MAVERICKS = MV_10_9, MV_YOSEMITE = MV_10_10, MV_ELCAPITAN = MV_10_11, + MV_SIERRA = MV_10_12, /* iOS */ MV_IOS = 1 << 8, @@ -170,6 +172,10 @@ public: MV_IOS_8_3 = Q_MV_IOS(8, 3), MV_IOS_8_4 = Q_MV_IOS(8, 4), MV_IOS_9_0 = Q_MV_IOS(9, 0), + MV_IOS_9_1 = Q_MV_IOS(9, 1), + MV_IOS_9_2 = Q_MV_IOS(9, 2), + MV_IOS_9_3 = Q_MV_IOS(9, 3), + MV_IOS_10_0 = Q_MV_IOS(10, 0), /* tvOS */ MV_TVOS = 1 << 9, diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index ccf5851d18..3dd2134f77 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -48,7 +48,7 @@ The operating system, must be one of: (Q_OS_x) DARWIN - Any Darwin system (OS X, iOS, watchOS, tvOS) - OSX - OS X + MACOS - macOS IOS - iOS WATCHOS - watchOS TVOS - tvOS @@ -117,7 +117,7 @@ # else # // there is no "real" OS X define (rdar://22640089), # // assume any non iOS-based platform is OS X for now -# define Q_OS_OSX +# define Q_OS_MACOS # endif # else # error "Qt has not been ported to this Apple platform - see http://www.qt.io/developers" @@ -229,15 +229,16 @@ #ifdef Q_OS_DARWIN64 #define Q_OS_MAC64 #endif -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS #define Q_OS_MACX +#define Q_OS_OSX #endif #ifdef Q_OS_DARWIN # include <Availability.h> # include <AvailabilityMacros.h> # -# ifdef Q_OS_OSX +# ifdef Q_OS_MACOS # if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 # undef __MAC_OS_X_VERSION_MIN_REQUIRED # define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_10_6 @@ -266,6 +267,9 @@ # if !defined(__MAC_10_11) # define __MAC_10_11 101100 # endif +# if !defined(__MAC_10_12) +# define __MAC_10_12 101200 +# endif # if !defined(MAC_OS_X_VERSION_10_7) # define MAC_OS_X_VERSION_10_7 1070 # endif @@ -281,6 +285,9 @@ # if !defined(MAC_OS_X_VERSION_10_11) # define MAC_OS_X_VERSION_10_11 101100 # endif +# if !defined(MAC_OS_X_VERSION_10_12) +# define MAC_OS_X_VERSION_10_12 101200 +# endif # # if !defined(__IPHONE_4_3) # define __IPHONE_4_3 40300 @@ -321,6 +328,18 @@ # if !defined(__IPHONE_9_0) # define __IPHONE_9_0 90000 # endif +# if !defined(__IPHONE_9_1) +# define __IPHONE_9_1 90100 +# endif +# if !defined(__IPHONE_9_2) +# define __IPHONE_9_2 90200 +# endif +# if !defined(__IPHONE_9_3) +# define __IPHONE_9_3 90300 +# endif +# if !defined(__IPHONE_10_0) +# define __IPHONE_10_0 100000 +# endif #endif #ifdef __LSB_VERSION__ |