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