diff options
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 5 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 6 | ||||
-rw-r--r-- | src/corelib/global/qoperatingsystemversion.cpp | 25 | ||||
-rw-r--r-- | src/corelib/global/qoperatingsystemversion.h | 1 | ||||
-rw-r--r-- | src/corelib/global/qsystemdetection.h | 6 |
5 files changed, 39 insertions, 4 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 01f534cc0f..12d76c0dca 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -4030,9 +4030,8 @@ bool qunsetenv(const char *varName) \list \li \c Q_PRIMITIVE_TYPE specifies that \a Type is a POD (plain old - data) type with no constructor or destructor, or else a type where - every bit pattern is a valid object and memcpy() creates a valid - independent copy of the object. + data) type with no constructor or destructor, and for which memcpy()ing + creates a valid independent copy of the object. \li \c Q_MOVABLE_TYPE specifies that \a Type has a constructor and/or a destructor but can be moved in memory using \c memcpy(). Note: despite the name, this has nothing to do with move diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 5634d6e6c3..f2ada4ab30 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -709,10 +709,14 @@ QT_END_NAMESPACE #include "private/qcoreapplication_p.h" +QT_WARNING_DISABLE_GCC("-Wattributes") +QT_WARNING_DISABLE_CLANG("-Wattributes") +QT_WARNING_DISABLE_INTEL(2621) + extern const char qt_core_interpreter[] __attribute__((section(".interp"))) = ELF_INTERPRETER; -extern "C" void qt_core_boilerplate(); +extern "C" void qt_core_boilerplate() __attribute__((force_align_arg_pointer)); void qt_core_boilerplate() { printf("This is the QtCore library version " QT_BUILD_STR "\n" diff --git a/src/corelib/global/qoperatingsystemversion.cpp b/src/corelib/global/qoperatingsystemversion.cpp index bc6adb54dc..a0ea801ba1 100644 --- a/src/corelib/global/qoperatingsystemversion.cpp +++ b/src/corelib/global/qoperatingsystemversion.cpp @@ -42,6 +42,10 @@ #include "qoperatingsystemversion_p.h" #endif +#if defined(Q_OS_DARWIN) +#include <QtCore/private/qcore_mac_p.h> +#endif + #include <qversionnumber.h> #include <qdebug.h> @@ -446,6 +450,27 @@ const QOperatingSystemVersion QOperatingSystemVersion::MacOSCatalina = QOperatingSystemVersion(QOperatingSystemVersion::MacOS, 10, 15); /*! + \variable QOperatingSystemVersion::MacOSBigSur + \brief a version corresponding to macOS Big Sur + + The actual version number depends on whether the application was built + using the Xcode 12 SDK. If it was, the version number corresponds + to macOS 11.0. If not it will correspond to macOS 10.16. + + By comparing QOperatingSystemVersion::current() to this constant + you will always end up comparing to the right version number. + \since 6.0 + */ +const QOperatingSystemVersion QOperatingSystemVersion::MacOSBigSur = [] { +#if defined(Q_OS_DARWIN) + if (QMacVersion::buildSDK(QMacVersion::ApplicationBinary) >= QOperatingSystemVersion(QOperatingSystemVersion::MacOS, 10, 16)) + return QOperatingSystemVersion(QOperatingSystemVersion::MacOS, 11, 0); + else +#endif + return QOperatingSystemVersion(QOperatingSystemVersion::MacOS, 10, 16); +}(); + +/*! \variable QOperatingSystemVersion::AndroidJellyBean \brief a version corresponding to Android Jelly Bean (version 4.1, API level 16). \since 5.9 diff --git a/src/corelib/global/qoperatingsystemversion.h b/src/corelib/global/qoperatingsystemversion.h index 89c60c4960..db4da1a9ae 100644 --- a/src/corelib/global/qoperatingsystemversion.h +++ b/src/corelib/global/qoperatingsystemversion.h @@ -72,6 +72,7 @@ public: static const QOperatingSystemVersion MacOSHighSierra; static const QOperatingSystemVersion MacOSMojave; static const QOperatingSystemVersion MacOSCatalina; + static const QOperatingSystemVersion MacOSBigSur; static const QOperatingSystemVersion AndroidJellyBean; static const QOperatingSystemVersion AndroidJellyBean_MR1; diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index 3e38e6790b..d87e181e5c 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -234,6 +234,9 @@ # if !defined(__MAC_10_15) # define __MAC_10_15 101500 # endif +# if !defined(__MAC_10_16) +# define __MAC_10_16 101600 +# endif # if !defined(MAC_OS_X_VERSION_10_11) # define MAC_OS_X_VERSION_10_11 __MAC_10_11 # endif @@ -249,6 +252,9 @@ # if !defined(MAC_OS_X_VERSION_10_15) # define MAC_OS_X_VERSION_10_15 __MAC_10_15 # endif +# if !defined(MAC_OS_X_VERSION_10_16) +# define MAC_OS_X_VERSION_10_16 __MAC_10_16 +# endif # # if !defined(__IPHONE_10_0) # define __IPHONE_10_0 100000 |