diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-09-22 00:33:17 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-09-25 00:58:41 +0000 |
commit | b0561e6382ccc880d9e3dab78d967478eca611bb (patch) | |
tree | 9122844de8fd8deeda980fd9b15f4d7c6e70ec62 /src/corelib/global/qoperatingsystemversion.cpp | |
parent | 0d0ad598c54652dbe04d5716025facd83adc979b (diff) |
Add currentType function to QOperatingSystemVersion
This allows us to retrieve the current OS type without constructing an
instance of the class, and it's also constexpr.
Change-Id: I8b32a1aebeb8139fe3fcf146e5de558fa1060bb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qoperatingsystemversion.cpp')
-rw-r--r-- | src/corelib/global/qoperatingsystemversion.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/global/qoperatingsystemversion.cpp b/src/corelib/global/qoperatingsystemversion.cpp index a77727320b..682c9bab61 100644 --- a/src/corelib/global/qoperatingsystemversion.cpp +++ b/src/corelib/global/qoperatingsystemversion.cpp @@ -155,6 +155,8 @@ QT_BEGIN_NAMESPACE \fn QOperatingSystemVersion QOperatingSystemVersion::current() Returns a QOperatingSystemVersion indicating the current OS and its version number. + + \sa currentType() */ #if !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN) QOperatingSystemVersion QOperatingSystemVersion::current() @@ -301,6 +303,14 @@ int QOperatingSystemVersion::compare(const QOperatingSystemVersion &v1, */ /*! + \fn QOperatingSystemVersion::OSType QOperatingSystemVersion::currentType() + + Returns the current OS type without constructing a QOperatingSystemVersion instance. + + \sa current() +*/ + +/*! \fn QString QOperatingSystemVersion::name() const Returns a string representation of the OS type identified by the QOperatingSystemVersion. |