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