From eb6e65e64a7347fa063ae0e5fa2daeddd6694a63 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Tue, 19 Jan 2021 10:53:05 +0200 Subject: [PATCH] Update QOperatingSystemVersion version names for Android Change-Id: I88c7713cd75f84d11b303e0dad2093c7d5568bc4 Reviewed-by: Andy Shaw --- .../global/qoperatingsystemversion.cpp | 36 +++++++++++++++++++ src/corelib/global/qoperatingsystemversion.h | 4 +++ 2 files changed, 40 insertions(+) diff --git a/src/corelib/global/qoperatingsystemversion.cpp b/src/corelib/global/qoperatingsystemversion.cpp index 4e623f658f..a9388a9795 100644 --- a/src/corelib/global/qoperatingsystemversion.cpp +++ b/src/corelib/global/qoperatingsystemversion.cpp @@ -200,6 +200,10 @@ QOperatingSystemVersion QOperatingSystemVersion::current() { 7, 0 }, // API level 24 { 7, 1 }, // API level 25 { 8, 0 }, // API level 26 + { 8, 1 }, // API level 27 + { 9, 0 }, // API level 28 + { 10, 0 }, // API level 29 + { 11, 0 }, // API level 30 }; // This will give us at least the first 2 version components @@ -563,6 +567,38 @@ const QOperatingSystemVersion QOperatingSystemVersion::AndroidNougat_MR1 = const QOperatingSystemVersion QOperatingSystemVersion::AndroidOreo = QOperatingSystemVersion(QOperatingSystemVersion::Android, 8, 0); +/*! + \variable QOperatingSystemVersion::AndroidOreo_MR1 + \brief a version corresponding to Android Oreo_MR1 (version 8.1, API level 27). + \since 6.1 + */ +const QOperatingSystemVersion QOperatingSystemVersion::AndroidOreo_MR1 = + QOperatingSystemVersion(QOperatingSystemVersion::Android, 8, 1); + +/*! + \variable QOperatingSystemVersion::AndroidPie + \brief a version corresponding to Android Pie (version 9.0, API level 28). + \since 6.1 + */ +const QOperatingSystemVersion QOperatingSystemVersion::AndroidPie = + QOperatingSystemVersion(QOperatingSystemVersion::Android, 9, 0); + +/*! + \variable QOperatingSystemVersion::AndroidQ + \brief a version corresponding to Android Q (version 10.0, API level 29). + \since 6.1 + */ +const QOperatingSystemVersion QOperatingSystemVersion::AndroidQ = + QOperatingSystemVersion(QOperatingSystemVersion::Android, 10, 0); + +/*! + \variable QOperatingSystemVersion::AndroidR + \brief a version corresponding to Android R (version 11.0, API level 30). + \since 6.1 + */ +const QOperatingSystemVersion QOperatingSystemVersion::AndroidR = + QOperatingSystemVersion(QOperatingSystemVersion::Android, 11, 0); + #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug debug, const QOperatingSystemVersion &ov) { diff --git a/src/corelib/global/qoperatingsystemversion.h b/src/corelib/global/qoperatingsystemversion.h index 2058ca3fc7..a693342824 100644 --- a/src/corelib/global/qoperatingsystemversion.h +++ b/src/corelib/global/qoperatingsystemversion.h @@ -84,6 +84,10 @@ public: static const QOperatingSystemVersion AndroidNougat; static const QOperatingSystemVersion AndroidNougat_MR1; static const QOperatingSystemVersion AndroidOreo; + static const QOperatingSystemVersion AndroidOreo_MR1; + static const QOperatingSystemVersion AndroidPie; + static const QOperatingSystemVersion AndroidQ; + static const QOperatingSystemVersion AndroidR; constexpr QOperatingSystemVersion(OSType osType, int vmajor, int vminor = -1, int vmicro = -1)