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 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
110 \value Unknown An unknown or unsupported operating system.
111*/
112
113/*!
114 \fn QOperatingSystemVersion::QOperatingSystemVersion(OSType osType, int vmajor, int vminor = -1, int vmicro = -1)
115
116 Constructs a QOperatingSystemVersion consisting of the OS type \a osType, and
117 major, minor, and micro version numbers \a vmajor, \a vminor and \a vmicro, respectively.
118*/
119
120/*!
121 \fn QOperatingSystemVersion QOperatingSystemVersion::current()
122
123 Returns a QOperatingSystemVersion indicating the current OS and its version number.
124
125 \sa currentType()
126*/
128{
129 static const QOperatingSystemVersionBase v = current_impl();
130 return v;
131}
132
133#if !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN)
135{
137 version.m_os = currentType();
138#ifdef Q_OS_ANDROID
139#ifndef QT_BOOTSTRAPPED
140 const QVersionNumber v = QVersionNumber::fromString(QJniObject::getStaticObjectField(
141 "android/os/Build$VERSION", "RELEASE", "Ljava/lang/String;").toString());
142 if (!v.isNull()) {
143 version.m_major = v.majorVersion();
144 version.m_minor = v.minorVersion();
145 version.m_micro = v.microVersion();
146 return version;
147 }
148#endif
149
150 version.m_major = -1;
151 version.m_minor = -1;
152
153 static const struct {
154 uint major : 4;
155 uint minor : 4;
156 } versions[] = {
157 { 1, 0 }, // API level 1
158 { 1, 1 }, // API level 2
159 { 1, 5 }, // API level 3
160 { 1, 6 }, // API level 4
161 { 2, 0 }, // API level 5
162 { 2, 0 }, // API level 6
163 { 2, 1 }, // API level 7
164 { 2, 2 }, // API level 8
165 { 2, 3 }, // API level 9
166 { 2, 3 }, // API level 10
167 { 3, 0 }, // API level 11
168 { 3, 1 }, // API level 12
169 { 3, 2 }, // API level 13
170 { 4, 0 }, // API level 14
171 { 4, 0 }, // API level 15
172 { 4, 1 }, // API level 16
173 { 4, 2 }, // API level 17
174 { 4, 3 }, // API level 18
175 { 4, 4 }, // API level 19
176 { 4, 4 }, // API level 20
177 { 5, 0 }, // API level 21
178 { 5, 1 }, // API level 22
179 { 6, 0 }, // API level 23
180 { 7, 0 }, // API level 24
181 { 7, 1 }, // API level 25
182 { 8, 0 }, // API level 26
183 { 8, 1 }, // API level 27
184 { 9, 0 }, // API level 28
185 { 10, 0 }, // API level 29
186 { 11, 0 }, // API level 30
187 { 12, 0 }, // API level 31
188 { 12, 0 }, // API level 32
189 { 13, 0 }, // API level 33
190 };
191
192 // This will give us at least the first 2 version components
193 const size_t versionIdx = QtAndroidPrivate::androidSdkVersion() - 1;
194 if (versionIdx < sizeof(versions) / sizeof(versions[0])) {
195 version.m_major = versions[versionIdx].major;
196 version.m_minor = versions[versionIdx].minor;
197 }
198
199 // API level 6 was exactly version 2.0.1
200 version.m_micro = versionIdx == 5 ? 1 : -1;
201#elif defined(Q_OS_OHOS)
202 static auto ohosVersionProps = QOhosJsThreadGateway::eval(
203 [](QOhosJsState &jsState) {
204 auto deviceInfoObj = jsState.eval<QNapi::Object>("@ohos.deviceInfo");
205 return std::array<int, 3>{{
206 deviceInfoObj.get<QNapi::Number>("majorVersion"),
207 deviceInfoObj.get<QNapi::Number>("seniorVersion"),
208 deviceInfoObj.get<QNapi::Number>("featureVersion"),
209 }};
210 });
211
212 version.m_major = ohosVersionProps[0];
213 version.m_minor = ohosVersionProps[1];
214 version.m_micro = ohosVersionProps[2];
215#else
216 version.m_major = -1;
217 version.m_minor = -1;
218 version.m_micro = -1;
219#endif
220 return version;
221}
222#endif
223
224static inline int compareVersionComponents(int lhs, int rhs) noexcept
225{
226 return lhs >= 0 && rhs >= 0 ? lhs - rhs : 0;
227}
228
230 QOperatingSystemVersionBase v2) noexcept
231{
232 if (v1.m_major == v2.m_major) {
233 if (v1.m_minor == v2.m_minor) {
234 return compareVersionComponents(v1.m_micro, v2.m_micro);
235 }
236 return compareVersionComponents(v1.m_minor, v2.m_minor);
237 }
238 return compareVersionComponents(v1.m_major, v2.m_major);
239}
240
241/*!
242 \fn QVersionNumber QOperatingSystemVersion::version() const
243
244 \since 6.1
245
246 Returns the operating system's version number.
247
248 See the main class documentation for what the version number is on a given
249 operating system.
250
251 \sa majorVersion(), minorVersion(), microVersion()
252*/
253
254/*!
255 \fn int QOperatingSystemVersion::majorVersion() const
256
257 Returns the major version number, that is, the first segment of the
258 operating system's version number.
259
260 See the main class documentation for what the major version number is on a given
261 operating system.
262
263 -1 indicates an unknown or absent version number component.
264
265 \sa version(), minorVersion(), microVersion()
266*/
267
268/*!
269 \fn int QOperatingSystemVersion::minorVersion() const
270
271 Returns the minor version number, that is, the second segment of the
272 operating system's version number.
273
274 See the main class documentation for what the minor version number is on a given
275 operating system.
276
277 -1 indicates an unknown or absent version number component.
278
279 \sa version(), majorVersion(), microVersion()
280*/
281
282/*!
283 \fn int QOperatingSystemVersion::microVersion() const
284
285 Returns the micro version number, that is, the third segment of the
286 operating system's version number.
287
288 See the main class documentation for what the micro version number is on a given
289 operating system.
290
291 -1 indicates an unknown or absent version number component.
292
293 \sa version(), majorVersion(), minorVersion()
294*/
295
296/*!
297 \fn int QOperatingSystemVersion::segmentCount() const
298
299 Returns the number of integers stored in the version number.
300*/
301
302/*!
303 \fn QOperatingSystemVersion::OSType QOperatingSystemVersion::type() const
304
305 Returns the OS type identified by the QOperatingSystemVersion.
306
307 \sa name()
308*/
309
310/*!
311 \fn QOperatingSystemVersion::OSType QOperatingSystemVersion::currentType()
312
313 Returns the current OS type without constructing a QOperatingSystemVersion instance.
314
315 \since 5.10
316
317 \sa current()
318*/
319
320/*!
321 \fn QString QOperatingSystemVersion::name() const
322
323 Returns a string representation of the OS type identified by the QOperatingSystemVersion.
324
325 \sa type()
326*/
328{
329 switch (osversion.type()) {
331 return QStringLiteral("Windows");
333 if (osversion.majorVersion() < 10)
334 return QStringLiteral("Mac OS");
335 if (osversion.majorVersion() == 10 && osversion.minorVersion() < 8)
336 return QStringLiteral("Mac OS X");
337 if (osversion.majorVersion() == 10 && osversion.minorVersion() < 12)
338 return QStringLiteral("OS X");
339 return QStringLiteral("macOS");
340 }
342 if (osversion.majorVersion() < 4)
343 return QStringLiteral("iPhone OS");
344 return QStringLiteral("iOS");
345 }
347 return QStringLiteral("tvOS");
349 return QStringLiteral("watchOS");
351 return QStringLiteral("visionOS");
353 return QStringLiteral("Android");
355 return QStringLiteral("OpenHarmony");
357 default:
358 return QString();
359 }
360}
361
362/*!
363 \fn bool QOperatingSystemVersion::isAnyOfType(std::initializer_list<OSType> types) const
364
365 Returns whether the OS type identified by the QOperatingSystemVersion
366 matches any of the OS types in \a types.
367*/
368bool QOperatingSystemVersion::isAnyOfType(std::initializer_list<OSType> types) const
369{
370 // ### Qt7: Remove this function
371 return std::find(types.begin(), types.end(), type()) != types.end();
372}
373
374bool QOperatingSystemVersionBase::isAnyOfType(std::initializer_list<OSType> types, OSType type)
375{
376 return std::find(types.begin(), types.end(), type) != types.end();
377}
378
379#ifndef QT_BOOTSTRAPPED
380
381/*!
382 \variable QOperatingSystemVersion::Windows7
383 \brief a version corresponding to Windows 7 (version 6.1).
384 \since 5.9
385 */
388
389/*!
390 \variable QOperatingSystemVersion::Windows8
391 \brief a version corresponding to Windows 8 (version 6.2).
392 \since 5.9
393 */
396
397/*!
398 \variable QOperatingSystemVersion::Windows8_1
399 \brief a version corresponding to Windows 8.1 (version 6.3).
400 \since 5.9
401 */
404
405/*!
406 \variable QOperatingSystemVersion::Windows10
407 \brief a version corresponding to general Windows 10 (version 10.0).
408 \since 5.9
409 */
412
413/*!
414 \variable QOperatingSystemVersion::Windows10_1809
415 \brief a version corresponding to Windows 10 October 2018 Update
416 Version 1809 (version 10.0.17763).
417 \since 6.3
418 */
420
421/*!
422 \variable QOperatingSystemVersion::Windows10_1903
423 \brief a version corresponding to Windows 10 May 2019 Update
424 Version 1903 (version 10.0.18362).
425 \since 6.3
426 */
428
429/*!
430 \variable QOperatingSystemVersion::Windows10_1909
431 \brief a version corresponding to Windows 10 November 2019 Update
432 Version 1909 (version 10.0.18363).
433 \since 6.3
434 */
436
437/*!
438 \variable QOperatingSystemVersion::Windows10_2004
439 \brief a version corresponding to Windows 10 May 2020 Update
440 Version 2004 (version 10.0.19041).
441 \since 6.3
442 */
444
445/*!
446 \variable QOperatingSystemVersion::Windows10_20H2
447 \brief a version corresponding to Windows 10 October 2020 Update
448 Version 20H2 (version 10.0.19042).
449 \since 6.3
450 */
452
453/*!
454 \variable QOperatingSystemVersion::Windows10_21H1
455 \brief a version corresponding to Windows 10 May 2021 Update
456 Version 21H1 (version 10.0.19043).
457 \since 6.3
458 */
460
461/*!
462 \variable QOperatingSystemVersion::Windows10_21H2
463 \brief a version corresponding to Windows 10 November 2021 Update
464 Version 21H2 (version 10.0.19044).
465 \since 6.3
466 */
468
469/*!
470 \variable QOperatingSystemVersion::Windows10_22H2
471 \brief a version corresponding to Windows 10 October 2022 Update
472 Version 22H2 (version 10.0.19045).
473 \since 6.5
474 */
476
477/*!
478 \variable QOperatingSystemVersion::Windows11
479 \brief a version corresponding to the initial release of Windows 11
480 (version 10.0.22000).
481 \since 6.3
482 */
484
485/*!
486 \variable QOperatingSystemVersion::Windows11_21H2
487 \brief a version corresponding to Windows 11 Version 21H2 (version 10.0.22000).
488 \since 6.4
489 */
491
492/*!
493 \variable QOperatingSystemVersion::Windows11_22H2
494 \brief a version corresponding to Windows 11 Version 22H2 (version 10.0.22621).
495 \since 6.4
496 */
498
499/*!
500 \variable QOperatingSystemVersion::Windows11_23H2
501 \brief a version corresponding to Windows 11 Version 23H2 (version 10.0.22631).
502 \since 6.6
503 */
504
505/*!
506 \variable QOperatingSystemVersion::Windows11_24H2
507 \brief a version corresponding to Windows 11 Version 24H2 (version 10.0.26100).
508 \since 6.8.1
509 */
510
511/*!
512 \variable QOperatingSystemVersion::Windows11_25H2
513 \brief a version corresponding to Windows 11 Version 25H2 (version 10.0.26200).
514 \since 6.11
515 */
516
517/*!
518 \variable QOperatingSystemVersion::OSXMavericks
519 \brief a version corresponding to OS X Mavericks (version 10.9).
520 \since 5.9
521 */
524
525/*!
526 \variable QOperatingSystemVersion::OSXYosemite
527 \brief a version corresponding to OS X Yosemite (version 10.10).
528 \since 5.9
529 */
532
533/*!
534 \variable QOperatingSystemVersion::OSXElCapitan
535 \brief a version corresponding to OS X El Capitan (version 10.11).
536 \since 5.9
537 */
540
541/*!
542 \variable QOperatingSystemVersion::MacOSSierra
543 \brief a version corresponding to macOS Sierra (version 10.12).
544 \since 5.9
545 */
548
549/*!
550 \variable QOperatingSystemVersion::MacOSHighSierra
551 \brief a version corresponding to macOS High Sierra (version 10.13).
552 \since 5.9.1
553 */
556
557/*!
558 \variable QOperatingSystemVersion::MacOSMojave
559 \brief a version corresponding to macOS Mojave (version 10.14).
560 \since 5.11.2
561 */
564
565/*!
566 \variable QOperatingSystemVersion::MacOSCatalina
567 \brief a version corresponding to macOS Catalina (version 10.15).
568 \since 5.12.5
569 */
572
573/*!
574 \variable QOperatingSystemVersion::MacOSBigSur
575 \brief a version corresponding to macOS Big Sur (version 11).
576 \since 6.0
577 */
580
581/*!
582 \variable QOperatingSystemVersion::MacOSMonterey
583 \brief a version corresponding to macOS Monterey (version 12).
584 \since 6.3
585 */
588
589/*!
590 \variable QOperatingSystemVersion::MacOSVentura
591 \brief a version corresponding to macOS Ventura (version 13).
592 \since 6.4
593*/
595
596/*!
597 \variable QOperatingSystemVersion::MacOSSonoma
598 \brief a version corresponding to macOS Sonoma (version 14).
599 \since 6.5
600*/
601
602/*!
603 \variable QOperatingSystemVersion::MacOSSequoia
604 \brief a version corresponding to macOS Sequoia (version 15).
605 \since 6.8
606*/
607
608/*!
609 \variable QOperatingSystemVersion::MacOSTahoe
610 \brief a version corresponding to macOS Tahoe (version 26).
611 \since 6.10
612*/
613
614/*!
615 \variable QOperatingSystemVersion::AndroidJellyBean
616 \brief a version corresponding to Android Jelly Bean (version 4.1, API level 16).
617 \since 5.9
618 */
621
622/*!
623 \variable QOperatingSystemVersion::AndroidJellyBean_MR1
624 \brief a version corresponding to Android Jelly Bean, maintenance release 1
625 (version 4.2, API level 17).
626 \since 5.9
627 */
630
631/*!
632 \variable QOperatingSystemVersion::AndroidJellyBean_MR2
633 \brief a version corresponding to Android Jelly Bean, maintenance release 2
634 (version 4.3, API level 18).
635 \since 5.9
636 */
639
640/*!
641 \variable QOperatingSystemVersion::AndroidKitKat
642 \brief a version corresponding to Android KitKat (versions 4.4 & 4.4W, API levels 19 & 20).
643 \since 5.9
644 */
647
648/*!
649 \variable QOperatingSystemVersion::AndroidLollipop
650 \brief a version corresponding to Android Lollipop (version 5.0, API level 21).
651 \since 5.9
652 */
655
656/*!
657 \variable QOperatingSystemVersion::AndroidLollipop_MR1
658 \brief a version corresponding to Android Lollipop, maintenance release 1
659 (version 5.1, API level 22).
660 \since 5.9
661 */
664
665/*!
666 \variable QOperatingSystemVersion::AndroidMarshmallow
667 \brief a version corresponding to Android Marshmallow (version 6.0, API level 23).
668 \since 5.9
669 */
672
673/*!
674 \variable QOperatingSystemVersion::AndroidNougat
675 \brief a version corresponding to Android Nougat (version 7.0, API level 24).
676 \since 5.9
677 */
680
681/*!
682 \variable QOperatingSystemVersion::AndroidNougat_MR1
683 \brief a version corresponding to Android Nougat, maintenance release 1
684 (version 7.0, API level 25).
685 \since 5.9
686 */
689
690/*!
691 \variable QOperatingSystemVersion::AndroidOreo
692 \brief a version corresponding to Android Oreo (version 8.0, API level 26).
693 \since 5.9.2
694 */
697
698/*!
699 \variable QOperatingSystemVersion::AndroidOreo_MR1
700 \brief a version corresponding to Android Oreo_MR1 (version 8.1, API level 27).
701 \since 6.1
702 */
705
706/*!
707 \variable QOperatingSystemVersion::AndroidPie
708 \brief a version corresponding to Android Pie (version 9.0, API level 28).
709 \since 6.1
710 */
713
714/*!
715 \variable QOperatingSystemVersion::Android10
716 \brief a version corresponding to Android 10 (version 10.0, API level 29).
717 \since 6.1
718 */
721
722/*!
723 \variable QOperatingSystemVersion::Android11
724 \brief a version corresponding to Android 11 (version 11.0, API level 30).
725 \since 6.1
726 */
729
730/*!
731 \variable QOperatingSystemVersion::Android12
732 \brief a version corresponding to Android 12 (version 12.0, API level 31).
733 \since 6.5
734 */
736
737/*!
738 \variable QOperatingSystemVersion::Android12L
739 \brief a version corresponding to Android 12L (version 12.0, API level 32).
740 \since 6.5
741 */
743
744/*!
745 \variable QOperatingSystemVersion::Android13
746 \brief a version corresponding to Android 13 (version 13.0, API level 33).
747 \since 6.5
748 */
750
751/*!
752 \variable QOperatingSystemVersion::Android14
753 \brief a version corresponding to Android 14 (version 14.0, API level 34).
754 \since 6.7
755 */
756
757#endif // !QT_BOOTSTRAPPED
758
759#ifndef QT_NO_DEBUG_STREAM
760QDebug operator<<(QDebug debug, const QOperatingSystemVersion &ov)
761{
762 QDebugStateSaver saver(debug);
763 debug.nospace();
764 debug << "QOperatingSystemVersion(" << ov.name()
765 << ", " << ov.majorVersion() << '.' << ov.minorVersion()
766 << '.' << ov.microVersion() << ')';
767 return debug;
768}
769#endif // !QT_NO_DEBUG_STREAM
770
771QT_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