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 14278bb250

[1] qtbase/3446313c7a5cd6005089866a7b20c9f28e132a0a

Change-Id: Id3444a1fba1384f9b4a410b3878ad25639b69f3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Yuhang Zhao 2022-10-12 09:22:11 +08:00
parent 8ba8d1346a
commit f8c6151de1
2 changed files with 4 additions and 12 deletions

View File

@ -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);

View File

@ -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) {}