Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QOperatingSystemVersionBase Class Reference

#include <qoperatingsystemversion.h>

+ Inheritance diagram for QOperatingSystemVersionBase:
+ Collaboration diagram for QOperatingSystemVersionBase:

Public Types

enum  OSType {
  Unknown = 0 , Windows , MacOS , IOS ,
  TvOS , WatchOS , Android , VisionOS
}
 

Public Member Functions

constexpr QOperatingSystemVersionBase (OSType osType, int vmajor, int vminor=-1, int vmicro=-1)
 
QVersionNumber version () const
 
constexpr int majorVersion () const
 
constexpr int minorVersion () const
 
constexpr int microVersion () const
 
constexpr int segmentCount () const
 
bool isAnyOfType (std::initializer_list< OSType > types) const
 
constexpr OSType type () const
 
QString name () const
 

Static Public Member Functions

static Q_CORE_EXPORT QOperatingSystemVersionBase current ()
 
static Q_CORE_EXPORT QString name (QOperatingSystemVersionBase osversion)
 
static Q_CORE_EXPORT bool isAnyOfType (std::initializer_list< OSType > types, OSType type)
 
static constexpr OSType currentType ()
 

Protected Member Functions

 QOperatingSystemVersionBase ()=default
 

Static Protected Member Functions

static Q_CORE_EXPORT int compare (QOperatingSystemVersionBase v1, QOperatingSystemVersionBase v2) noexcept
 

Friends

Qt::partial_ordering compareThreeWay (const QOperatingSystemVersionBase &lhs, const QOperatingSystemVersionBase &rhs) noexcept
 
bool operator> (QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs) noexcept
 
bool operator>= (QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs) noexcept
 
bool operator< (QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs) noexcept
 
bool operator<= (QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs) noexcept
 

Detailed Description

Definition at line 21 of file qoperatingsystemversion.h.

Member Enumeration Documentation

◆ OSType

Enumerator
Unknown 
Windows 
MacOS 
IOS 
TvOS 
WatchOS 
Android 
VisionOS 

Definition at line 26 of file qoperatingsystemversion.h.

Constructor & Destructor Documentation

◆ QOperatingSystemVersionBase() [1/2]

constexpr QOperatingSystemVersionBase::QOperatingSystemVersionBase ( OSType osType,
int vmajor,
int vminor = -1,
int vmicro = -1 )
inlineconstexpr

Definition at line 37 of file qoperatingsystemversion.h.

◆ QOperatingSystemVersionBase() [2/2]

QOperatingSystemVersionBase::QOperatingSystemVersionBase ( )
protecteddefault

Member Function Documentation

◆ compare()

int QOperatingSystemVersionBase::compare ( QOperatingSystemVersionBase v1,
QOperatingSystemVersionBase v2 )
staticprotectednoexcept

Definition at line 208 of file qoperatingsystemversion.cpp.

References compareVersionComponents().

+ Here is the call graph for this function:

◆ current()

◆ currentType()

static constexpr OSType QOperatingSystemVersionBase::currentType ( )
inlinestaticconstexpr

Definition at line 49 of file qoperatingsystemversion.h.

References Android, IOS, MacOS, TvOS, Unknown, VisionOS, WatchOS, and Windows.

Referenced by QOperatingSystemVersion::currentType().

+ Here is the caller graph for this function:

◆ isAnyOfType() [1/2]

bool QOperatingSystemVersionBase::isAnyOfType ( std::initializer_list< OSType > types) const
inline

Definition at line 79 of file qoperatingsystemversion.h.

References isAnyOfType(), and type().

+ Here is the call graph for this function:

◆ isAnyOfType() [2/2]

bool QOperatingSystemVersionBase::isAnyOfType ( std::initializer_list< OSType > types,
OSType type )
static

Definition at line 351 of file qoperatingsystemversion.cpp.

Referenced by isAnyOfType().

+ Here is the caller graph for this function:

◆ majorVersion()

constexpr int QOperatingSystemVersionBase::majorVersion ( ) const
inlineconstexpr

Definition at line 72 of file qoperatingsystemversion.h.

Referenced by QRhiMetal::create().

+ Here is the caller graph for this function:

◆ microVersion()

constexpr int QOperatingSystemVersionBase::microVersion ( ) const
inlineconstexpr

Definition at line 74 of file qoperatingsystemversion.h.

◆ minorVersion()

constexpr int QOperatingSystemVersionBase::minorVersion ( ) const
inlineconstexpr

Definition at line 73 of file qoperatingsystemversion.h.

Referenced by QRhiMetal::create().

+ Here is the caller graph for this function:

◆ name() [1/2]

QString QOperatingSystemVersionBase::name ( ) const
inline

Definition at line 84 of file qoperatingsystemversion.h.

References name().

Referenced by name().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ name() [2/2]

QString QOperatingSystemVersionBase::name ( QOperatingSystemVersionBase osversion)
static

Definition at line 306 of file qoperatingsystemversion.cpp.

References Android, IOS, MacOS, QStringLiteral, TvOS, Unknown, VisionOS, WatchOS, and Windows.

◆ segmentCount()

constexpr int QOperatingSystemVersionBase::segmentCount ( ) const
inlineconstexpr

Definition at line 76 of file qoperatingsystemversion.h.

◆ type()

constexpr OSType QOperatingSystemVersionBase::type ( ) const
inlineconstexpr

Definition at line 83 of file qoperatingsystemversion.h.

Referenced by isAnyOfType(), and QOperatingSystemVersion::type().

+ Here is the caller graph for this function:

◆ version()

QVersionNumber QOperatingSystemVersionBase::version ( ) const
inline

Definition at line 70 of file qoperatingsystemversion.h.

Friends And Related Symbol Documentation

◆ compareThreeWay

Qt::partial_ordering compareThreeWay ( const QOperatingSystemVersionBase & lhs,
const QOperatingSystemVersionBase & rhs )
friend

Definition at line 90 of file qoperatingsystemversion.h.

◆ operator<

bool operator< ( QOperatingSystemVersionBase lhs,
QOperatingSystemVersionBase rhs )
friend

Definition at line 111 of file qoperatingsystemversion.h.

◆ operator<=

bool operator<= ( QOperatingSystemVersionBase lhs,
QOperatingSystemVersionBase rhs )
friend

Definition at line 115 of file qoperatingsystemversion.h.

◆ operator>

bool operator> ( QOperatingSystemVersionBase lhs,
QOperatingSystemVersionBase rhs )
friend

Definition at line 104 of file qoperatingsystemversion.h.

◆ operator>=

bool operator>= ( QOperatingSystemVersionBase lhs,
QOperatingSystemVersionBase rhs )
friend

Definition at line 108 of file qoperatingsystemversion.h.


The documentation for this class was generated from the following files: