From c1e4c7d7639b84c0220e3a2ddd455d03c0910893 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 26 Aug 2019 11:11:10 +0200 Subject: Improve docs of QSysInfo - Compile the docs for deprecated APIs conditionally, based on deprecation version. - Document the alternatives to be used instead of the deprecated APIs. Change-Id: I671b3b8dd14a0dc079a31cbc8e048c41cc603bb9 Reviewed-by: Leena Miettinen Reviewed-by: Volker Hilsheimer --- src/corelib/global/qglobal.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index dd54ef61dc..15cb809377 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1199,11 +1199,14 @@ bool qSharedBuild() noexcept the application is compiled (32 or 64). */ +#if QT_DEPRECATED_SINCE(5, 9) /*! \deprecated \variable QSysInfo::WindowsVersion \brief the version of the Windows operating system on which the application is run. + + Use QOperatingSystemVersion::current() instead. */ /*! @@ -1211,6 +1214,8 @@ bool qSharedBuild() noexcept \fn QSysInfo::WindowsVersion QSysInfo::windowsVersion() \since 4.4 + Use QOperatingSystemVersion::current() instead. + Returns the version of the Windows operating system on which the application is run, or WV_None if the operating system is not Windows. @@ -1221,16 +1226,21 @@ bool qSharedBuild() noexcept \variable QSysInfo::MacintoshVersion \brief the version of the Macintosh operating system on which the application is run. + + Use QOperatingSystemVersion::current() instead. */ /*! \deprecated \fn QSysInfo::MacVersion QSysInfo::macVersion() + Use QOperatingSystemVersion::current() instead. + Returns the version of Darwin (\macos or iOS) on which the application is run, or MV_None if the operating system is not a version of Darwin. */ +#endif /*! \enum QSysInfo::Endian @@ -1241,10 +1251,13 @@ bool qSharedBuild() noexcept the platform's byte order. */ +#if QT_DEPRECATED_SINCE(5, 9) /*! \deprecated \enum QSysInfo::WinVersion + Use the versions defined in QOperatingSystemVersion instead. + This enum provides symbolic names for the various versions of the Windows operating system. On Windows, the QSysInfo::WindowsVersion variable gives the version of the system @@ -1302,6 +1315,8 @@ bool qSharedBuild() noexcept \deprecated \enum QSysInfo::MacVersion + Use the versions defined in QOperatingSystemVersion instead. + This enum provides symbolic names for the various versions of the Darwin operating system, covering both \macos and iOS. The QSysInfo::MacintoshVersion variable gives the version of the @@ -1372,6 +1387,7 @@ bool qSharedBuild() noexcept \sa WinVersion */ +#endif /*! \macro Q_OS_DARWIN -- cgit v1.2.3