4#include <QtCore/qglobal.h>
5#include <QtCore/qcompare.h>
6#include <QtCore/qversionnumber.h>
8#ifndef QOPERATINGSYSTEMVERSION_H
9#define QOPERATINGSYSTEMVERSION_H
14# pragma qt_class(QOperatingSystemVersionBase)
15# pragma qt_class(QOperatingSystemVersion)
16# pragma qt_sync_stop_processing
38 int vmajor,
int vminor = -1,
int vmicro = -1)
53#elif defined(Q_OS_MACOS)
55#elif defined(Q_OS_IOS)
57#elif defined(Q_OS_TVOS)
59#elif defined(Q_OS_WATCHOS)
61#elif defined(Q_OS_VISIONOS)
63#elif defined(Q_OS_ANDROID)
77 {
return m_micro >= 0 ? 3 : m_minor >= 0 ? 2 : m_major >= 0 ? 1 : 0; }
93 if (lhs.type() != rhs.type())
98#ifdef __cpp_lib_three_way_comparison
99 friend std::partial_ordering
130#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED) && !defined(Q_QDOC)
148#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED) && !defined(Q_QDOC)
156#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
172#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) && !defined(QT_BOOTSTRAPPED)
261#if QT_CORE_REMOVED_SINCE(6, 3) || defined(Q_QDOC)
270#if QT_CORE_REMOVED_SINCE(6, 3) || defined(Q_QDOC)
282 QT7_ONLY(Q_CORE_EXPORT)
bool isAnyOfType(std::initializer_list<OSType>
types)
const;
283#if QT_CORE_REMOVED_SINCE(6, 3) || defined(Q_QDOC)
290#if QT_CORE_REMOVED_SINCE(6, 3)
298#ifndef QT_NO_DEBUG_STREAM
constexpr int segmentCount() const
QVersionNumber version() const
friend bool operator<=(QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs) noexcept
friend bool operator<(QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs) noexcept
QOperatingSystemVersionBase()=default
friend bool operator>=(QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs) noexcept
constexpr QOperatingSystemVersionBase(OSType osType, int vmajor, int vminor=-1, int vmicro=-1)
static Q_CORE_EXPORT QOperatingSystemVersionBase current()
bool isAnyOfType(std::initializer_list< OSType > types) const
constexpr int majorVersion() const
static Q_CORE_EXPORT bool isAnyOfType(std::initializer_list< OSType > types, OSType type)
constexpr int minorVersion() const
constexpr int microVersion() const
friend bool operator>(QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs) noexcept
friend Qt::partial_ordering compareThreeWay(const QOperatingSystemVersionBase &lhs, const QOperatingSystemVersionBase &rhs) noexcept
static constexpr OSType currentType()
constexpr OSType type() const
static Q_CORE_EXPORT int compare(QOperatingSystemVersionBase v1, QOperatingSystemVersionBase v2) noexcept
static constexpr OSType currentType()
Returns the current OS type without constructing a QOperatingSystemVersion instance.
constexpr QOperatingSystemVersion(const QOperatingSystemVersionBase &osversion)
constexpr QOperatingSystemVersion(OSType osType, int vmajor, int vminor=-1, int vmicro=-1)
Constructs a QOperatingSystemVersion consisting of the OS type osType, and major, minor,...
constexpr OSType type() const
Returns the OS type identified by the QOperatingSystemVersion.
\macro QT_RESTRICTED_CAST_FROM_ASCII
\variable Qt::weak_ordering::less
static const partial_ordering unordered
Combined button and popup list for selecting options.
constexpr Qt::strong_ordering compareThreeWay(LeftInt lhs, RightInt rhs) noexcept
GLint GLfloat GLfloat GLfloat v2
GLsizei GLenum GLenum * types
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QOperatingSystemVersion &ov)
\variable QOperatingSystemVersion::Android14
static int segmentCount(const QPainterPath &path, qreal pathLength)
static int compare(quint64 a, quint64 b)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)