diff options
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 11 | ||||
-rw-r--r-- | src/corelib/global/qglobal.cpp | 60 | ||||
-rw-r--r-- | src/corelib/global/qsysinfo.h | 6 | ||||
-rw-r--r-- | src/corelib/global/qsystemdetection.h | 12 |
4 files changed, 57 insertions, 32 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index f8a8a436be..060af29b03 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -155,7 +155,9 @@ /* Clang also masquerades as GCC */ # if defined(__apple_build_version__) # /* http://en.wikipedia.org/wiki/Xcode#Toolchain_Versions */ -# if __apple_build_version__ >= 6000051 +# if __apple_build_version__ >= 7000053 +# define Q_CC_CLANG 306 +# elif __apple_build_version__ >= 6000051 # define Q_CC_CLANG 305 # elif __apple_build_version__ >= 5030038 # define Q_CC_CLANG 304 @@ -556,7 +558,10 @@ # define Q_COMPILER_ALIGNAS # define Q_COMPILER_ALIGNOF # define Q_COMPILER_INHERITING_CONSTRUCTORS -# define Q_COMPILER_THREAD_LOCAL +# ifndef Q_OS_OSX +// C++11 thread_local is broken on OS X (Clang doesn't support it either) +# define Q_COMPILER_THREAD_LOCAL +# endif # define Q_COMPILER_UDL # endif # endif @@ -613,7 +618,7 @@ # if __has_feature(cxx_strong_enums) # define Q_COMPILER_CLASS_ENUM # endif -# if __has_feature(cxx_constexpr) +# if __has_feature(cxx_constexpr) && Q_CC_CLANG > 302 /* CLANG 3.2 has bad/partial support */ # define Q_COMPILER_CONSTEXPR # endif # if __has_feature(cxx_decltype) /* && __has_feature(cxx_decltype_incomplete_return_types) */ diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 91e8699472..85d97c7b06 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1125,10 +1125,11 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_10_4 Mac OS X 10.4 (unsupported) \value MV_10_5 Mac OS X 10.5 (unsupported) \value MV_10_6 Mac OS X 10.6 - \value MV_10_7 OS X 10.7 + \value MV_10_7 Mac OS X 10.7 \value MV_10_8 OS X 10.8 \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_Unknown An unknown and currently unsupported platform \value MV_CHEETAH Apple codename for MV_10_0 @@ -1142,6 +1143,7 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_MOUNTAINLION Apple codename for MV_10_8 \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_IOS iOS (any) \value MV_IOS_4_3 iOS 4.3 @@ -1155,6 +1157,8 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_IOS_8_1 iOS 8.1 \value MV_IOS_8_2 iOS 8.2 \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_None Not a Darwin operating system @@ -2050,32 +2054,27 @@ QSysInfo::WinVersion QSysInfo::windowsVersion() #ifdef QT_DEBUG { - QByteArray override = qgetenv("QT_WINVER_OVERRIDE"); - if (override.isEmpty()) - return winver; - - if (override == "Me") - winver = QSysInfo::WV_Me; - if (override == "95") - winver = QSysInfo::WV_95; - else if (override == "98") - winver = QSysInfo::WV_98; - else if (override == "NT") - winver = QSysInfo::WV_NT; - else if (override == "2000") - winver = QSysInfo::WV_2000; - else if (override == "2003") - winver = QSysInfo::WV_2003; - else if (override == "XP") - winver = QSysInfo::WV_XP; - else if (override == "VISTA") - winver = QSysInfo::WV_VISTA; - else if (override == "WINDOWS7") - winver = QSysInfo::WV_WINDOWS7; - else if (override == "WINDOWS8") - winver = QSysInfo::WV_WINDOWS8; - else if (override == "WINDOWS8_1") - winver = QSysInfo::WV_WINDOWS8_1; + if (Q_UNLIKELY(qEnvironmentVariableIsSet("QT_WINVER_OVERRIDE"))) { + const QByteArray winVerOverride = qgetenv("QT_WINVER_OVERRIDE"); + if (winVerOverride == "NT") + winver = QSysInfo::WV_NT; + else if (winVerOverride == "2000") + winver = QSysInfo::WV_2000; + else if (winVerOverride == "2003") + winver = QSysInfo::WV_2003; + else if (winVerOverride == "XP") + winver = QSysInfo::WV_XP; + else if (winVerOverride == "VISTA") + winver = QSysInfo::WV_VISTA; + else if (winVerOverride == "WINDOWS7") + winver = QSysInfo::WV_WINDOWS7; + else if (winVerOverride == "WINDOWS8") + winver = QSysInfo::WV_WINDOWS8; + else if (winVerOverride == "WINDOWS8_1") + winver = QSysInfo::WV_WINDOWS8_1; + else if (winVerOverride == "WINDOWS10") + winver = QSysInfo::WV_WINDOWS10; + } } #endif #endif // !Q_OS_WINRT @@ -2102,6 +2101,8 @@ static const char *winVer_helper() return "8"; case QSysInfo::WV_WINDOWS8_1: return "8.1"; + case QSysInfo::WV_WINDOWS10: + return "10"; case QSysInfo::WV_CE: return "CE"; @@ -2731,7 +2732,7 @@ QString QSysInfo::prettyProductName() basename = "Mac OS X Snow Leopard ("; break; case MV_LION: - basename = "Mac OS X Lion ("; + basename = "OS X Lion ("; break; case MV_MOUNTAINLION: basename = "OS X Mountain Lion ("; @@ -2742,6 +2743,9 @@ QString QSysInfo::prettyProductName() case MV_YOSEMITE: basename = "OS X Yosemite ("; break; + case MV_ELCAPITAN: + basename = "OS X El Capitan ("; + break; } if (basename) return QLatin1String(basename) + productVersion() + QLatin1Char(')'); diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h index 72acdd8c70..d40e6659c7 100644 --- a/src/corelib/global/qsysinfo.h +++ b/src/corelib/global/qsysinfo.h @@ -137,6 +137,7 @@ public: MV_10_8 = Q_MV_OSX(10, 8), MV_10_9 = Q_MV_OSX(10, 9), MV_10_10 = Q_MV_OSX(10, 10), + MV_10_11 = Q_MV_OSX(10, 11), /* codenames */ MV_CHEETAH = MV_10_0, @@ -150,6 +151,7 @@ public: MV_MOUNTAINLION = MV_10_8, MV_MAVERICKS = MV_10_9, MV_YOSEMITE = MV_10_10, + MV_ELCAPITAN = MV_10_11, /* iOS */ MV_IOS = 1 << 8, @@ -163,7 +165,9 @@ public: MV_IOS_8_0 = Q_MV_IOS(8, 0), MV_IOS_8_1 = Q_MV_IOS(8, 1), MV_IOS_8_2 = Q_MV_IOS(8, 2), - MV_IOS_8_3 = Q_MV_IOS(8, 3) + 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) }; #if defined(Q_OS_MAC) static const MacVersion MacintoshVersion; diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index cb662c7db1..562427e4b9 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -233,6 +233,9 @@ # if !defined(__MAC_10_10) # define __MAC_10_10 101000 # endif +# if !defined(__MAC_10_11) +# define __MAC_10_11 101100 +# endif # if !defined(MAC_OS_X_VERSION_10_7) # define MAC_OS_X_VERSION_10_7 1070 # endif @@ -245,6 +248,9 @@ # if !defined(MAC_OS_X_VERSION_10_10) # define MAC_OS_X_VERSION_10_10 101000 # endif +# if !defined(MAC_OS_X_VERSION_10_11) +# define MAC_OS_X_VERSION_10_11 101100 +# endif # # if !defined(__IPHONE_4_3) # define __IPHONE_4_3 40300 @@ -279,6 +285,12 @@ # if !defined(__IPHONE_8_3) # define __IPHONE_8_3 80300 # endif +# if !defined(__IPHONE_8_4) +# define __IPHONE_8_4 80400 +# endif +# if !defined(__IPHONE_9_0) +# define __IPHONE_9_0 90000 +# endif #endif #ifdef __LSB_VERSION__ |