diff options
author | Liang Qi <liang.qi@qt.io> | 2017-04-18 10:43:17 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-04-18 10:46:22 +0200 |
commit | 18934bcb0c388eb4723043cb5001702fecaf90bc (patch) | |
tree | 59f4f1e5de00fa49e49bace1a38f1bce52e48457 /src/corelib/global/qglobal.cpp | |
parent | bc5454d2c41873349ea32c42aca8fc794cba442e (diff) | |
parent | d1210281e41008ce2e3510aa5cfb3ebea1c57734 (diff) |
Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
src/corelib/global/qglobal.cpp
Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 1f93d3cbec..c37503f3db 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2628,12 +2628,14 @@ QString QSysInfo::kernelVersion() to determine the distribution name and returns that. If determining the distribution name failed, it returns "unknown". - \b{Darwin, \macos, iOS, tvOS, and watchOS note}: this function returns - "macos" for \macos systems, "ios" for iOS systems, "tvos" for tvOS systems, - "watchos" for watchOS systems, and "darwin" in case the system could not - be determined. + \b{\macos note}: this function returns "osx" for all \macos systems, + regardless of Apple naming convention. The returned string will be updated + for Qt 6. Note that this function erroneously returned "macos" for \macos + 10.12 in Qt versions 5.6.2, 5.7.1, and 5.8.0. - \b{OS X note}: this function returns "osx" for versions of \macos prior to 10.12. + \b{Darwin, iOS, tvOS, and watchOS note}: this function returns "ios" for + iOS systems, "tvos" for tvOS systems, "watchos" for watchOS systems, and + "darwin" in case the system could not be determined. \b{FreeBSD note}: this function returns "debian" for Debian/kFreeBSD and "unknown" otherwise. @@ -2666,10 +2668,12 @@ QString QSysInfo::productType() #elif defined(Q_OS_WATCHOS) return QStringLiteral("watchos"); #elif defined(Q_OS_MACOS) - const auto version = QOperatingSystemVersion::current(); - if (version.majorVersion() == 10 && version.minorVersion() < 12) - return QStringLiteral("osx"); + // ### Qt6: remove fallback +# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) return QStringLiteral("macos"); +# else + return QStringLiteral("osx"); +# endif #elif defined(Q_OS_DARWIN) return QStringLiteral("darwin"); |