QLibraryInfo: mark isDebugBuild() noexcept and CONST

It's literally

   return true; // or
   return false;

so it can be marked as noexcept and (the stronger form of) pure.

Change-Id: Id55fee1db5d18201be2ea6c6778ece3de68b05f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2022-02-04 00:59:58 +01:00
parent d32fb5f1fe
commit 64de057ebe
2 changed files with 2 additions and 2 deletions

View File

@ -291,7 +291,7 @@ const char *QLibraryInfo::build() noexcept
false if it was built in release mode.
*/
bool
QLibraryInfo::isDebugBuild()
QLibraryInfo::isDebugBuild() noexcept
{
#ifdef QT_DEBUG
return true;

View File

@ -51,7 +51,7 @@ class Q_CORE_EXPORT QLibraryInfo
public:
static const char *build() noexcept;
static bool isDebugBuild();
static bool isDebugBuild() noexcept Q_DECL_CONST_FUNCTION;
#ifndef QT_BOOTSTRAPPED
static QVersionNumber version() noexcept Q_DECL_CONST_FUNCTION;