summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorYuhang Zhao <2546789017@qq.com>2022-10-12 09:22:11 +0800
committerYuhang Zhao <2546789017@qq.com>2022-10-15 21:34:20 +0800
commitf8c6151de19afbfee47e0f1c554c90feba6bfabb (patch)
treef7b72d87583f9757292445d1f242f0c221446084 /src/corelib/global
parent8ba8d1346a562347c398bdd0529d34f94f2ac698 (diff)
QOperatingSystemVersion: fix newly introduced Android versions
When introducing new entries for QOperatingSystemVersion, We should follow the new pattern [1], not the old legacy one. Amends commit 14278bb2506c079c4e10724107bd36b7af49b09b [1] qtbase/3446313c7a5cd6005089866a7b20c9f28e132a0a Change-Id: Id3444a1fba1384f9b4a410b3878ad25639b69f3d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qoperatingsystemversion.cpp6
-rw-r--r--src/corelib/global/qoperatingsystemversion.h10
2 files changed, 4 insertions, 12 deletions
diff --git a/src/corelib/global/qoperatingsystemversion.cpp b/src/corelib/global/qoperatingsystemversion.cpp
index bb29a6b1a0..05bcf2cd56 100644
--- a/src/corelib/global/qoperatingsystemversion.cpp
+++ b/src/corelib/global/qoperatingsystemversion.cpp
@@ -665,24 +665,18 @@ const QOperatingSystemVersion QOperatingSystemVersion::Android11 =
\brief a version corresponding to Android 12 (version 12.0, API level 31).
\since 6.5
*/
-const QOperatingSystemVersion QOperatingSystemVersion::Android12 =
- QOperatingSystemVersion(QOperatingSystemVersion::Android, 12, 0);
/*!
\variable QOperatingSystemVersion::Android12L
\brief a version corresponding to Android 12L (version 12.0, API level 32).
\since 6.5
*/
-const QOperatingSystemVersion QOperatingSystemVersion::Android12L =
- QOperatingSystemVersion(QOperatingSystemVersion::Android, 12, 0);
/*!
\variable QOperatingSystemVersion::Android13
\brief a version corresponding to Android 13 (version 13.0, API level 33).
\since 6.5
*/
-const QOperatingSystemVersion QOperatingSystemVersion::Android13 =
- QOperatingSystemVersion(QOperatingSystemVersion::Android, 13, 0);
diff --git a/src/corelib/global/qoperatingsystemversion.h b/src/corelib/global/qoperatingsystemversion.h
index d6fee2980c..5277333fdf 100644
--- a/src/corelib/global/qoperatingsystemversion.h
+++ b/src/corelib/global/qoperatingsystemversion.h
@@ -152,9 +152,6 @@ public:
static const QOperatingSystemVersion AndroidPie;
static const QOperatingSystemVersion Android10;
static const QOperatingSystemVersion Android11;
- static const QOperatingSystemVersion Android12;
- static const QOperatingSystemVersion Android12L;
- static const QOperatingSystemVersion Android13;
#else
static constexpr QOperatingSystemVersionBase Windows7 { QOperatingSystemVersionBase::Windows, 6, 1 };
static constexpr QOperatingSystemVersionBase Windows8 { QOperatingSystemVersionBase::Windows, 6, 2 };
@@ -189,9 +186,6 @@ public:
static constexpr QOperatingSystemVersionBase AndroidPie { QOperatingSystemVersionBase::Android, 9, 0 };
static constexpr QOperatingSystemVersionBase Android10 { QOperatingSystemVersionBase::Android, 10, 0 };
static constexpr QOperatingSystemVersionBase Android11 { QOperatingSystemVersionBase::Android, 11, 0 };
- static constexpr QOperatingSystemVersionBase Android12 { QOperatingSystemVersionBase::Android, 12, 0 };
- static constexpr QOperatingSystemVersionBase Android12L { QOperatingSystemVersionBase::Android, 12, 0 };
- static constexpr QOperatingSystemVersionBase Android13 { QOperatingSystemVersionBase::Android, 13, 0 };
#endif // New (static constexpr) entries go here, only cherry-pick as far back as 6.3 (QTBUG-97808):
static constexpr QOperatingSystemVersionBase Windows10_1809 { QOperatingSystemVersionBase::Windows, 10, 0, 17763 }; // RS5
@@ -205,6 +199,10 @@ public:
static constexpr QOperatingSystemVersionBase Windows11_21H2 = Windows11;
static constexpr QOperatingSystemVersionBase Windows11_22H2 { QOperatingSystemVersionBase::Windows, 10, 0, 22621 };
+ static constexpr QOperatingSystemVersionBase Android12 { QOperatingSystemVersionBase::Android, 12, 0 };
+ static constexpr QOperatingSystemVersionBase Android12L { QOperatingSystemVersionBase::Android, 12, 0 };
+ static constexpr QOperatingSystemVersionBase Android13 { QOperatingSystemVersionBase::Android, 13, 0 };
+
constexpr QOperatingSystemVersion(const QOperatingSystemVersionBase &osversion)
: QOperatingSystemVersionBase(osversion) {}