Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qoperatingsystemversion.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
6
7#if !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN)
9#endif
10
11#if defined(Q_OS_DARWIN)
12#include <QtCore/private/qcore_mac_p.h>
13#endif
14
15#include <qversionnumber.h>
16#include <qdebug.h>
17
18#ifdef Q_OS_ANDROID
19#include <QtCore/private/qjnihelpers_p.h>
20#include <QJniObject>
21#endif
22
23#if defined(Q_OS_HARMONY)
24#include <QtCore/private/qcore_ohos_p.h>
25#include <QtCore/private/qohosmemoizingjsthreadfetcher_p.h>
26#include <array>
27#endif
28
30
31/*!
32 \class QOperatingSystemVersion
33 \inmodule QtCore
34 \since 5.9
35 \brief The QOperatingSystemVersion class provides information about the
36 operating system version.
37
38 Unlike other version functions in QSysInfo, QOperatingSystemVersion provides
39 access to the full version number that \a developers typically use to vary
40 behavior or determine whether to enable APIs or features based on the
41 operating system version (as opposed to the kernel version number or
42 marketing version).
43
44 Presently, Android, Apple Platforms (iOS, macOS, tvOS, watchOS, and visionOS),
45 OpenHarmony (HarmonyOS), and Windows are supported.
46
47 The \a majorVersion(), \a minorVersion(), and \a microVersion() functions
48 return the parts of the operating system version number based on:
49
50 \table
51 \header
52 \li Platforms
53 \li Value
54 \row
55 \li Android
56 \li result of parsing
57 \l{https://developer.android.com/reference/android/os/Build.VERSION.html#RELEASE}{android.os.Build.VERSION.RELEASE}
58 using QVersionNumber, with a fallback to
59 \l{https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT}{android.os.Build.VERSION.SDK_INT}
60 to determine the major and minor version component if the former
61 fails
62 \row
63 \li Apple Platforms
64 \li majorVersion, minorVersion, and patchVersion from
65 \l{https://developer.apple.com/reference/foundation/nsprocessinfo/1410906-operatingsystemversion?language=objc}{NSProcessInfo.operatingSystemVersion}
66 \row
67 \li Windows
68 \li dwMajorVersion, dwMinorVersion, and dwBuildNumber from
69 \l{https://docs.microsoft.com/en-us/windows/win32/devnotes/rtlgetversion}
70 {RtlGetVersion} -
71 note that this function ALWAYS return the version number of the
72 underlying operating system, as opposed to the shim underneath
73 GetVersionEx that hides the real version number if the
74 application is not manifested for that version of the OS
75 \endtable
76
77 Because QOperatingSystemVersion stores both a version number and an OS type, the OS type
78 can be taken into account when performing comparisons. For example, on a macOS system running
79 macOS Sierra (v10.12), the following expression will return \c false even though the
80 major version number component of the object on the left hand side of the expression (10) is
81 greater than that of the object on the right (9):
82
83 \snippet code/src_corelib_global_qoperatingsystemversion.cpp 0
84
85 This allows expressions for multiple operating systems to be joined with a logical OR operator
86 and still work as expected. For example:
87
88 \snippet code/src_corelib_global_qoperatingsystemversion.cpp 1
89
90 A more naive comparison algorithm might incorrectly return true on all versions of macOS,
91 including Mac OS 9. This behavior is achieved by overloading the comparison operators to return
92 \c false whenever the OS types of the QOperatingSystemVersion instances being compared do not
93 match. Be aware that due to this it can be the case \c x >= y and \c x < y are BOTH \c false
94 for the same instances of \c x and \c y.
95*/
96
97/*!
98 \enum QOperatingSystemVersion::OSType
99
100 This enum provides symbolic names for the various operating
101 system families supported by QOperatingSystemVersion.
102
103 \value Android The Google Android operating system.
104 \value IOS The Apple iOS operating system.
105 \value MacOS The Apple macOS operating system.
106 \value TvOS The Apple tvOS operating system.
107 \value WatchOS The Apple watchOS operating system.
108 \value VisionOS The Apple visionOS operating system.
109 \value Windows The Microsoft Windows operating system.
110 \value [since 6.12] HarmonyOS The HarmonyOS operating system.
111
112 \value Unknown An unknown or unsupported operating system.
113*/
114
115/*!
116 \fn QOperatingSystemVersion::QOperatingSystemVersion(OSType osType, int vmajor, int vminor = -1, int vmicro = -1)
117
118 Constructs a QOperatingSystemVersion consisting of the OS type \a osType, and
119 major, minor, and micro version numbers \a vmajor, \a vminor and \a vmicro, respectively.
120*/
121
122/*!
123 \fn QOperatingSystemVersion QOperatingSystemVersion::current()
124
125 Returns a QOperatingSystemVersion indicating the current OS and its version number.
126
127 \sa currentType()
128*/
130{
131 static const QOperatingSystemVersionBase v = current_impl();
132 return v;
133}
134
135#if defined(Q_OS_HARMONY)
136static QOhosMemoizingJsThreadFetcher<std::array<int, 3>> ohosVersionPropsFetcher(
137 [](QOhosJsState &jsState) -> std::optional<std::array<int, 3>> {
138 auto deviceInfoObj = jsState.eval<QNapi::Object>("@ohos.deviceInfo");
139 return std::array<int, 3>{{
140 deviceInfoObj.get<QNapi::Number>("majorVersion"),
141 deviceInfoObj.get<QNapi::Number>("seniorVersion"),
142 deviceInfoObj.get<QNapi::Number>("featureVersion"),
143 }};
144 },
145 "DeviceInfo.*Version");
146#endif
147
148#if !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN)
150{
152 version.m_os = currentType();
153#ifdef Q_OS_ANDROID
154#ifndef QT_BOOTSTRAPPED
155 const QVersionNumber v = QVersionNumber::fromString(QJniObject::getStaticObjectField(
156 "android/os/Build$VERSION", "RELEASE", "Ljava/lang/String;").toString());
157 if (!v.isNull()) {
158 version.m_major = v.majorVersion();
159 version.m_minor = v.minorVersion();
160 version.m_micro = v.microVersion();
161 return version;
162 }
163#endif
164
165 version.m_major = -1;
166 version.m_minor = -1;
167
168 static const struct {
169 uint major : 4;
170 uint minor : 4;
171 } versions[] = {
172 { 1, 0 }, // API level 1
173 { 1, 1 }, // API level 2
174 { 1, 5 }, // API level 3
175 { 1, 6 }, // API level 4
176 { 2, 0 }, // API level 5
177 { 2, 0 }, // API level 6
178 { 2, 1 }, // API level 7
179 { 2, 2 }, // API level 8
180 { 2, 3 }, // API level 9
181 { 2, 3 }, // API level 10
182 { 3, 0 }, // API level 11
183 { 3, 1 }, // API level 12
184 { 3, 2 }, // API level 13
185 { 4, 0 }, // API level 14
186 { 4, 0 }, // API level 15
187 { 4, 1 }, // API level 16
188 { 4, 2 }, // API level 17
189 { 4, 3 }, // API level 18
190 { 4, 4 }, // API level 19
191 { 4, 4 }, // API level 20
192 { 5, 0 }, // API level 21
193 { 5, 1 }, // API level 22
194 { 6, 0 }, // API level 23
195 { 7, 0 }, // API level 24
196 { 7, 1 }, // API level 25
197 { 8, 0 }, // API level 26
198 { 8, 1 }, // API level 27
199 { 9, 0 }, // API level 28
200 { 10, 0 }, // API level 29
201 { 11, 0 }, // API level 30
202 { 12, 0 }, // API level 31
203 { 12, 0 }, // API level 32
204 { 13, 0 }, // API level 33
205 };
206
207 // This will give us at least the first 2 version components
208 const size_t versionIdx = QtAndroidPrivate::androidSdkVersion() - 1;
209 if (versionIdx < sizeof(versions) / sizeof(versions[0])) {
210 version.m_major = versions[versionIdx].major;
211 version.m_minor = versions[versionIdx].minor;
212 }
213
214 // API level 6 was exactly version 2.0.1
215 version.m_micro = versionIdx == 5 ? 1 : -1;
216#elif defined(Q_OS_HARMONY)
217 constexpr std::array<int, 3> fallbackOhosVersionProps = {{-1, -1, -1}};
218 const auto ohosVersionProps = ohosVersionPropsFetcher.optValue().value_or(fallbackOhosVersionProps);
219
220 version.m_major = ohosVersionProps[0];
221 version.m_minor = ohosVersionProps[1];
222 version.m_micro = ohosVersionProps[2];
223#else
224 version.m_major = -1;
225 version.m_minor = -1;
226 version.m_micro = -1;
227#endif
228 return version;
229}
230#endif
231
232static inline int compareVersionComponents(int lhs, int rhs) noexcept
233{
234 return lhs >= 0 && rhs >= 0 ? lhs - rhs : 0;
235}
236
238 QOperatingSystemVersionBase v2) noexcept
239{
240 if (v1.m_major == v2.m_major) {
241 if (v1.m_minor == v2.m_minor) {
242 return compareVersionComponents(v1.m_micro, v2.m_micro);
243 }
244 return compareVersionComponents(v1.m_minor, v2.m_minor);
245 }
246 return compareVersionComponents(v1.m_major, v2.m_major);
247}
248
249/*!
250 \fn QVersionNumber QOperatingSystemVersion::version() const
251
252 \since 6.1
253
254 Returns the operating system's version number.
255
256 See the main class documentation for what the version number is on a given
257 operating system.
258
259 \sa majorVersion(), minorVersion(), microVersion()
260*/
261
262/*!
263 \fn int QOperatingSystemVersion::majorVersion() const
264
265 Returns the major version number, that is, the first segment of the
266 operating system's version number.
267
268 See the main class documentation for what the major version number is on a given
269 operating system.
270
271 -1 indicates an unknown or absent version number component.
272
273 \sa version(), minorVersion(), microVersion()
274*/
275
276/*!
277 \fn int QOperatingSystemVersion::minorVersion() const
278
279 Returns the minor version number, that is, the second segment of the
280 operating system's version number.
281
282 See the main class documentation for what the minor version number is on a given
283 operating system.
284
285 -1 indicates an unknown or absent version number component.
286
287 \sa version(), majorVersion(), microVersion()
288*/
289
290/*!
291 \fn int QOperatingSystemVersion::microVersion() const
292
293 Returns the micro version number, that is, the third segment of the
294 operating system's version number.
295
296 See the main class documentation for what the micro version number is on a given
297 operating system.
298
299 -1 indicates an unknown or absent version number component.
300
301 \sa version(), majorVersion(), minorVersion()
302*/
303
304/*!
305 \fn int QOperatingSystemVersion::segmentCount() const
306
307 Returns the number of integers stored in the version number.
308*/
309
310/*!
311 \fn QOperatingSystemVersion::OSType QOperatingSystemVersion::type() const
312
313 Returns the OS type identified by the QOperatingSystemVersion.
314
315 \sa name()
316*/
317
318/*!
319 \fn QOperatingSystemVersion::OSType QOperatingSystemVersion::currentType()
320
321 Returns the current OS type without constructing a QOperatingSystemVersion instance.
322
323 \since 5.10
324
325 \sa current()
326*/
327
328/*!
329 \fn QString QOperatingSystemVersion::name() const
330
331 Returns a string representation of the OS type identified by the QOperatingSystemVersion.
332
333 \sa type()
334*/
336{
337 switch (osversion.type()) {
339 return QStringLiteral("Windows");
341 if (osversion.majorVersion() < 10)
342 return QStringLiteral("Mac OS");
343 if (osversion.majorVersion() == 10 && osversion.minorVersion() < 8)
344 return QStringLiteral("Mac OS X");
345 if (osversion.majorVersion() == 10 && osversion.minorVersion() < 12)
346 return QStringLiteral("OS X");
347 return QStringLiteral("macOS");
348 }
350 if (osversion.majorVersion() < 4)
351 return QStringLiteral("iPhone OS");
352 return QStringLiteral("iOS");
353 }
355 return QStringLiteral("tvOS");
357 return QStringLiteral("watchOS");
359 return QStringLiteral("visionOS");
361 return QStringLiteral("Android");
363 return QStringLiteral("HarmonyOS");
365 default:
366 return QString();
367 }
368}
369
370/*!
371 \fn bool QOperatingSystemVersion::isAnyOfType(std::initializer_list<OSType> types) const
372
373 Returns whether the OS type identified by the QOperatingSystemVersion
374 matches any of the OS types in \a types.
375*/
376bool QOperatingSystemVersion::isAnyOfType(std::initializer_list<OSType> types) const
377{
378 // ### Qt7: Remove this function
379 return std::find(types.begin(), types.end(), type()) != types.end();
380}
381
382bool QOperatingSystemVersionBase::isAnyOfType(std::initializer_list<OSType> types, OSType type)
383{
384 return std::find(types.begin(), types.end(), type) != types.end();
385}
386
387#ifndef QT_BOOTSTRAPPED
388
389/*!
390 \variable QOperatingSystemVersion::Windows7
391 \brief a version corresponding to Windows 7 (version 6.1).
392 \since 5.9
393 */
396
397/*!
398 \variable QOperatingSystemVersion::Windows8
399 \brief a version corresponding to Windows 8 (version 6.2).
400 \since 5.9
401 */
404
405/*!
406 \variable QOperatingSystemVersion::Windows8_1
407 \brief a version corresponding to Windows 8.1 (version 6.3).
408 \since 5.9
409 */
412
413/*!
414 \variable QOperatingSystemVersion::Windows10
415 \brief a version corresponding to general Windows 10 (version 10.0).
416 \since 5.9
417 */
420
421/*!
422 \variable QOperatingSystemVersion::Windows10_1809
423 \brief a version corresponding to Windows 10 October 2018 Update
424 Version 1809 (version 10.0.17763).
425 \since 6.3
426 */
428
429/*!
430 \variable QOperatingSystemVersion::Windows10_1903
431 \brief a version corresponding to Windows 10 May 2019 Update
432 Version 1903 (version 10.0.18362).
433 \since 6.3
434 */
436
437/*!
438 \variable QOperatingSystemVersion::Windows10_1909
439 \brief a version corresponding to Windows 10 November 2019 Update
440 Version 1909 (version 10.0.18363).
441 \since 6.3
442 */
444
445/*!
446 \variable QOperatingSystemVersion::Windows10_2004
447 \brief a version corresponding to Windows 10 May 2020 Update
448 Version 2004 (version 10.0.19041).
449 \since 6.3
450 */
452
453/*!
454 \variable QOperatingSystemVersion::Windows10_20H2
455 \brief a version corresponding to Windows 10 October 2020 Update
456 Version 20H2 (version 10.0.19042).
457 \since 6.3
458 */
460
461/*!
462 \variable QOperatingSystemVersion::Windows10_21H1
463 \brief a version corresponding to Windows 10 May 2021 Update
464 Version 21H1 (version 10.0.19043).
465 \since 6.3
466 */
468
469/*!
470 \variable QOperatingSystemVersion::Windows10_21H2
471 \brief a version corresponding to Windows 10 November 2021 Update
472 Version 21H2 (version 10.0.19044).
473 \since 6.3
474 */
476
477/*!
478 \variable QOperatingSystemVersion::Windows10_22H2
479 \brief a version corresponding to Windows 10 October 2022 Update
480 Version 22H2 (version 10.0.19045).
481 \since 6.5
482 */
484
485/*!
486 \variable QOperatingSystemVersion::Windows11
487 \brief a version corresponding to the initial release of Windows 11
488 (version 10.0.22000).
489 \since 6.3
490 */
492
493/*!
494 \variable QOperatingSystemVersion::Windows11_21H2
495 \brief a version corresponding to Windows 11 Version 21H2 (version 10.0.22000).
496 \since 6.4
497 */
499
500/*!
501 \variable QOperatingSystemVersion::Windows11_22H2
502 \brief a version corresponding to Windows 11 Version 22H2 (version 10.0.22621).
503 \since 6.4
504 */
506
507/*!
508 \variable QOperatingSystemVersion::Windows11_23H2
509 \brief a version corresponding to Windows 11 Version 23H2 (version 10.0.22631).
510 \since 6.6
511 */
512
513/*!
514 \variable QOperatingSystemVersion::Windows11_24H2
515 \brief a version corresponding to Windows 11 Version 24H2 (version 10.0.26100).
516 \since 6.8.1
517 */
518
519/*!
520 \variable QOperatingSystemVersion::Windows11_25H2
521 \brief a version corresponding to Windows 11 Version 25H2 (version 10.0.26200).
522 \since 6.11
523 */
524
525/*!
526 \variable QOperatingSystemVersion::OSXMavericks
527 \brief a version corresponding to OS X Mavericks (version 10.9).
528 \since 5.9
529 */
532
533/*!
534 \variable QOperatingSystemVersion::OSXYosemite
535 \brief a version corresponding to OS X Yosemite (version 10.10).
536 \since 5.9
537 */
540
541/*!
542 \variable QOperatingSystemVersion::OSXElCapitan
543 \brief a version corresponding to OS X El Capitan (version 10.11).
544 \since 5.9
545 */
548
549/*!
550 \variable QOperatingSystemVersion::MacOSSierra
551 \brief a version corresponding to macOS Sierra (version 10.12).
552 \since 5.9
553 */
556
557/*!
558 \variable QOperatingSystemVersion::MacOSHighSierra
559 \brief a version corresponding to macOS High Sierra (version 10.13).
560 \since 5.9.1
561 */
564
565/*!
566 \variable QOperatingSystemVersion::MacOSMojave
567 \brief a version corresponding to macOS Mojave (version 10.14).
568 \since 5.11.2
569 */
572
573/*!
574 \variable QOperatingSystemVersion::MacOSCatalina
575 \brief a version corresponding to macOS Catalina (version 10.15).
576 \since 5.12.5
577 */
580
581/*!
582 \variable QOperatingSystemVersion::MacOSBigSur
583 \brief a version corresponding to macOS Big Sur (version 11).
584 \since 6.0
585 */
588
589/*!
590 \variable QOperatingSystemVersion::MacOSMonterey
591 \brief a version corresponding to macOS Monterey (version 12).
592 \since 6.3
593 */
596
597/*!
598 \variable QOperatingSystemVersion::MacOSVentura
599 \brief a version corresponding to macOS Ventura (version 13).
600 \since 6.4
601*/
603
604/*!
605 \variable QOperatingSystemVersion::MacOSSonoma
606 \brief a version corresponding to macOS Sonoma (version 14).
607 \since 6.5
608*/
609
610/*!
611 \variable QOperatingSystemVersion::MacOSSequoia
612 \brief a version corresponding to macOS Sequoia (version 15).
613 \since 6.8
614*/
615
616/*!
617 \variable QOperatingSystemVersion::MacOSTahoe
618 \brief a version corresponding to macOS Tahoe (version 26).
619 \since 6.10
620*/
621
622/*!
623 \variable QOperatingSystemVersion::MacOSGoldenGate
624 \brief a version corresponding to macOS Golden Gate (version 27).
625 \since 6.12
626*/
627
628/*!
629 \variable QOperatingSystemVersion::AndroidJellyBean
630 \brief a version corresponding to Android Jelly Bean (version 4.1, API level 16).
631 \since 5.9
632 */
635
636/*!
637 \variable QOperatingSystemVersion::AndroidJellyBean_MR1
638 \brief a version corresponding to Android Jelly Bean, maintenance release 1
639 (version 4.2, API level 17).
640 \since 5.9
641 */
644
645/*!
646 \variable QOperatingSystemVersion::AndroidJellyBean_MR2
647 \brief a version corresponding to Android Jelly Bean, maintenance release 2
648 (version 4.3, API level 18).
649 \since 5.9
650 */
653
654/*!
655 \variable QOperatingSystemVersion::AndroidKitKat
656 \brief a version corresponding to Android KitKat (versions 4.4 & 4.4W, API levels 19 & 20).
657 \since 5.9
658 */
661
662/*!
663 \variable QOperatingSystemVersion::AndroidLollipop
664 \brief a version corresponding to Android Lollipop (version 5.0, API level 21).
665 \since 5.9
666 */
669
670/*!
671 \variable QOperatingSystemVersion::AndroidLollipop_MR1
672 \brief a version corresponding to Android Lollipop, maintenance release 1
673 (version 5.1, API level 22).
674 \since 5.9
675 */
678
679/*!
680 \variable QOperatingSystemVersion::AndroidMarshmallow
681 \brief a version corresponding to Android Marshmallow (version 6.0, API level 23).
682 \since 5.9
683 */
686
687/*!
688 \variable QOperatingSystemVersion::AndroidNougat
689 \brief a version corresponding to Android Nougat (version 7.0, API level 24).
690 \since 5.9
691 */
694
695/*!
696 \variable QOperatingSystemVersion::AndroidNougat_MR1
697 \brief a version corresponding to Android Nougat, maintenance release 1
698 (version 7.0, API level 25).
699 \since 5.9
700 */
703
704/*!
705 \variable QOperatingSystemVersion::AndroidOreo
706 \brief a version corresponding to Android Oreo (version 8.0, API level 26).
707 \since 5.9.2
708 */
711
712/*!
713 \variable QOperatingSystemVersion::AndroidOreo_MR1
714 \brief a version corresponding to Android Oreo_MR1 (version 8.1, API level 27).
715 \since 6.1
716 */
719
720/*!
721 \variable QOperatingSystemVersion::AndroidPie
722 \brief a version corresponding to Android Pie (version 9.0, API level 28).
723 \since 6.1
724 */
727
728/*!
729 \variable QOperatingSystemVersion::Android10
730 \brief a version corresponding to Android 10 (version 10.0, API level 29).
731 \since 6.1
732 */
735
736/*!
737 \variable QOperatingSystemVersion::Android11
738 \brief a version corresponding to Android 11 (version 11.0, API level 30).
739 \since 6.1
740 */
743
744/*!
745 \variable QOperatingSystemVersion::Android12
746 \brief a version corresponding to Android 12 (version 12.0, API level 31).
747 \since 6.5
748 */
750
751/*!
752 \variable QOperatingSystemVersion::Android12L
753 \brief a version corresponding to Android 12L (version 12.0, API level 32).
754 \since 6.5
755 */
757
758/*!
759 \variable QOperatingSystemVersion::Android13
760 \brief a version corresponding to Android 13 (version 13.0, API level 33).
761 \since 6.5
762 */
764
765/*!
766 \variable QOperatingSystemVersion::Android14
767 \brief a version corresponding to Android 14 (version 14.0, API level 34).
768 \since 6.7
769 */
770
771#endif // !QT_BOOTSTRAPPED
772
773#ifndef QT_NO_DEBUG_STREAM
774QDebug operator<<(QDebug debug, const QOperatingSystemVersion &ov)
775{
776 QDebugStateSaver saver(debug);
777 debug.nospace();
778 debug << "QOperatingSystemVersion(" << ov.name()
779 << ", " << ov.majorVersion() << '.' << ov.minorVersion()
780 << '.' << ov.microVersion() << ')';
781 return debug;
782}
783#endif // !QT_NO_DEBUG_STREAM
784
785QT_END_NAMESPACE
static constexpr OSType currentType()
static constexpr QOperatingSystemVersionBase Windows11_21H2
\variable QOperatingSystemVersion::Windows11_21H2
static constexpr QOperatingSystemVersionBase AndroidNougat
\variable QOperatingSystemVersion::AndroidNougat
static constexpr QOperatingSystemVersionBase Android10
\variable QOperatingSystemVersion::Android10
static constexpr QOperatingSystemVersionBase MacOSSierra
\variable QOperatingSystemVersion::MacOSSierra
static constexpr QOperatingSystemVersionBase OSXYosemite
\variable QOperatingSystemVersion::OSXYosemite
static constexpr QOperatingSystemVersionBase Android12L
\variable QOperatingSystemVersion::Android12L
static constexpr QOperatingSystemVersionBase Windows10_1909
\variable QOperatingSystemVersion::Windows10_1909
static constexpr QOperatingSystemVersionBase AndroidKitKat
\variable QOperatingSystemVersion::AndroidKitKat
static constexpr QOperatingSystemVersionBase AndroidJellyBean
\variable QOperatingSystemVersion::MacOSSonoma
static constexpr QOperatingSystemVersionBase AndroidOreo_MR1
\variable QOperatingSystemVersion::AndroidOreo_MR1
static constexpr QOperatingSystemVersionBase Android13
\variable QOperatingSystemVersion::Android13
static constexpr QOperatingSystemVersionBase MacOSCatalina
\variable QOperatingSystemVersion::MacOSCatalina
static constexpr QOperatingSystemVersionBase AndroidLollipop_MR1
\variable QOperatingSystemVersion::AndroidLollipop_MR1
static constexpr QOperatingSystemVersionBase Windows10
\variable QOperatingSystemVersion::Windows10
static constexpr QOperatingSystemVersionBase Windows10_1903
\variable QOperatingSystemVersion::Windows10_1903
static constexpr QOperatingSystemVersionBase Android12
\variable QOperatingSystemVersion::Android12
static constexpr QOperatingSystemVersionBase OSXElCapitan
\variable QOperatingSystemVersion::OSXElCapitan
static constexpr QOperatingSystemVersionBase MacOSMojave
\variable QOperatingSystemVersion::MacOSMojave
static constexpr QOperatingSystemVersionBase Windows8
\variable QOperatingSystemVersion::Windows8
static constexpr QOperatingSystemVersionBase AndroidNougat_MR1
\variable QOperatingSystemVersion::AndroidNougat_MR1
static constexpr QOperatingSystemVersionBase Windows10_2004
\variable QOperatingSystemVersion::Windows10_2004
static constexpr QOperatingSystemVersionBase MacOSHighSierra
\variable QOperatingSystemVersion::MacOSHighSierra
static constexpr QOperatingSystemVersionBase Windows10_21H2
\variable QOperatingSystemVersion::Windows10_21H2
static constexpr QOperatingSystemVersionBase AndroidMarshmallow
\variable QOperatingSystemVersion::AndroidMarshmallow
constexpr QOperatingSystemVersion(OSType osType, int vmajor, int vminor=-1, int vmicro=-1)
Constructs a QOperatingSystemVersion consisting of the OS type osType, and major, minor,...
static constexpr QOperatingSystemVersionBase AndroidJellyBean_MR2
\variable QOperatingSystemVersion::AndroidJellyBean_MR2
static constexpr QOperatingSystemVersionBase Windows10_20H2
\variable QOperatingSystemVersion::Windows10_20H2
static constexpr QOperatingSystemVersionBase AndroidPie
\variable QOperatingSystemVersion::AndroidPie
static constexpr QOperatingSystemVersionBase AndroidOreo
\variable QOperatingSystemVersion::AndroidOreo
static constexpr QOperatingSystemVersionBase OSXMavericks
\variable QOperatingSystemVersion::Windows11_23H2
static constexpr QOperatingSystemVersionBase MacOSMonterey
\variable QOperatingSystemVersion::MacOSMonterey
static constexpr QOperatingSystemVersionBase Windows7
\variable QOperatingSystemVersion::Windows7
static constexpr QOperatingSystemVersionBase MacOSVentura
\variable QOperatingSystemVersion::MacOSVentura
static constexpr QOperatingSystemVersionBase Windows10_1809
\variable QOperatingSystemVersion::Windows10_1809
static constexpr QOperatingSystemVersionBase AndroidJellyBean_MR1
\variable QOperatingSystemVersion::AndroidJellyBean_MR1
static constexpr QOperatingSystemVersionBase MacOSBigSur
\variable QOperatingSystemVersion::MacOSBigSur
static constexpr QOperatingSystemVersionBase AndroidLollipop
\variable QOperatingSystemVersion::AndroidLollipop
static constexpr QOperatingSystemVersionBase Windows8_1
\variable QOperatingSystemVersion::Windows8_1
static constexpr QOperatingSystemVersionBase Windows10_21H1
\variable QOperatingSystemVersion::Windows10_21H1
static constexpr QOperatingSystemVersionBase Windows11_22H2
\variable QOperatingSystemVersion::Windows11_22H2
static constexpr QOperatingSystemVersionBase Windows10_22H2
\variable QOperatingSystemVersion::Windows10_22H2
static constexpr QOperatingSystemVersionBase Android11
\variable QOperatingSystemVersion::Android11
static constexpr QOperatingSystemVersionBase Windows11
\variable QOperatingSystemVersion::Windows11
Combined button and popup list for selecting options.
static int compareVersionComponents(int lhs, int rhs) noexcept