42 #if !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN)
46 #if defined(Q_OS_DARWIN)
47 #include <QtCore/private/qcore_mac_p.h>
158 #if !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN)
164 #ifndef QT_BOOTSTRAPPED
166 "android/os/Build$VERSION",
"RELEASE",
"Ljava/lang/String;").toString());
178 static const struct {
215 const size_t versionIdx = size_t(QJniObject::getStaticField<jint>(
216 "android/os/Build$VERSION",
"SDK_INT")) - 1;
217 if (versionIdx <
sizeof(versions) /
sizeof(versions[0])) {
218 version.m_major = versions[versionIdx].major;
219 version.m_minor = versions[versionIdx].minor;
223 version.m_micro = versionIdx == 5 ? 1 : -1;
239 static inline int compareVersionComponents(
int lhs,
int rhs)
241 return lhs >= 0 &&
rhs >= 0 ? lhs -
rhs : 0;
247 if (
v1.m_major ==
v2.m_major) {
248 if (
v1.m_minor ==
v2.m_minor) {
249 return compareVersionComponents(
v1.m_micro,
v2.m_micro);
251 return compareVersionComponents(
v1.m_minor,
v2.m_minor);
253 return compareVersionComponents(
v1.m_major,
v2.m_major);
349 switch (osversion.
type()) {
544 #if defined(Q_OS_DARWIN)
676 #ifndef QT_NO_DEBUG_STREAM
681 debug <<
"QOperatingSystemVersion(" << ov.
name()
operator<<(QDataStream &ds, qfloat16 f)
The QDebug class provides an output stream for debugging information.
Convenience class for custom QDebug operators.
static QOperatingSystemVersion buildSDK(VersionTarget target=ApplicationBinary)
QVersionNumber version() const
static Q_CORE_EXPORT QOperatingSystemVersionBase current()
constexpr int majorVersion() const
static Q_CORE_EXPORT bool isAnyOfType(std::initializer_list< OSType > types, OSType type)
constexpr int minorVersion() const
static Q_CORE_EXPORT int compare(QOperatingSystemVersionBase v1, QOperatingSystemVersionBase v2)
static constexpr OSType currentType()
constexpr OSType type() const
The QOperatingSystemVersion class provides information about the operating system version.
static constexpr QOperatingSystemVersionBase AndroidNougat
a version corresponding to Android Nougat (version 7.0, API level 24).
static constexpr QOperatingSystemVersionBase Android10
a version corresponding to Android 10 (version 10.0, API level 29).
static constexpr QOperatingSystemVersionBase MacOSSierra
a version corresponding to macOS Sierra (version 10.12).
static constexpr QOperatingSystemVersionBase OSXYosemite
a version corresponding to OS X Yosemite (version 10.10).
constexpr int majorVersion() const
static constexpr QOperatingSystemVersionBase AndroidKitKat
a version corresponding to Android KitKat (versions 4.4 & 4.4W, API levels 19 & 20).
static constexpr QOperatingSystemVersionBase AndroidJellyBean
a version corresponding to Android Jelly Bean (version 4.1, API level 16).
static constexpr QOperatingSystemVersionBase AndroidOreo_MR1
a version corresponding to Android Oreo_MR1 (version 8.1, API level 27).
static constexpr QOperatingSystemVersionBase MacOSCatalina
a version corresponding to macOS Catalina (version 10.15).
static constexpr QOperatingSystemVersionBase AndroidLollipop_MR1
a version corresponding to Android Lollipop, maintenance release 1 (version 5.1, API level 22).
static constexpr QOperatingSystemVersionBase Windows10
a version corresponding to Windows 10 (version 10.0).
constexpr int minorVersion() const
static constexpr QOperatingSystemVersionBase OSXElCapitan
a version corresponding to OS X El Capitan (version 10.11).
static constexpr QOperatingSystemVersionBase MacOSMojave
a version corresponding to macOS Mojave (version 10.14).
static constexpr QOperatingSystemVersionBase Windows8
a version corresponding to Windows 8 (version 6.2).
static constexpr QOperatingSystemVersionBase AndroidNougat_MR1
a version corresponding to Android Nougat, maintenance release 1 (version 7.0, API level 25).
static constexpr QOperatingSystemVersionBase MacOSHighSierra
a version corresponding to macOS High Sierra (version 10.13).
static QOperatingSystemVersion current()
[0]
static constexpr QOperatingSystemVersionBase AndroidMarshmallow
a version corresponding to Android Marshmallow (version 6.0, API level 23).
static constexpr QOperatingSystemVersionBase AndroidJellyBean_MR2
a version corresponding to Android Jelly Bean, maintenance release 2 (version 4.3,...
static constexpr QOperatingSystemVersionBase AndroidPie
a version corresponding to Android Pie (version 9.0, API level 28).
static constexpr QOperatingSystemVersionBase AndroidOreo
a version corresponding to Android Oreo (version 8.0, API level 26).
static constexpr QOperatingSystemVersionBase OSXMavericks
a version corresponding to Windows 10 1809 (version 10.0.17763).
static constexpr QOperatingSystemVersionBase MacOSMonterey
a version corresponding to macOS Monterey (version 12).
static constexpr QOperatingSystemVersionBase Windows7
a version corresponding to Windows 7 (version 6.1).
constexpr int microVersion() const
static constexpr QOperatingSystemVersionBase AndroidJellyBean_MR1
a version corresponding to Android Jelly Bean, maintenance release 1 (version 4.2,...
static constexpr QOperatingSystemVersionBase MacOSBigSur
a version corresponding to macOS Big Sur
bool isAnyOfType(std::initializer_list< OSType > types) const
static constexpr QOperatingSystemVersionBase AndroidLollipop
a version corresponding to Android Lollipop (version 5.0, API level 21).
static constexpr QOperatingSystemVersionBase Windows8_1
a version corresponding to Windows 8.1 (version 6.3).
static constexpr QOperatingSystemVersionBase Android11
a version corresponding to Android 11 (version 11.0, API level 30).
The QString class provides a Unicode character string.
The QVersionNumber class contains a version number with an arbitrary number of segments.
int minorVersion() const noexcept
int majorVersion() const noexcept
static Q_CORE_EXPORT QVersionNumber fromString(const QString &string, int *suffixIndex=nullptr)
int microVersion() const noexcept
GLint GLfloat GLfloat GLfloat v2
GLsizei const GLfloat * v
[13]
GLsizei GLenum GLenum * types
#define QStringLiteral(str)
QDomElement find(const QString &tagName, const QDomElement &e)