summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-02-04 00:59:58 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-02-05 07:26:55 +0100
commit64de057ebe8c4a2a0ee1ede834a67508cd4f81b1 (patch)
tree1cc9fc1ff8a45d5c5c942077e2e1e6d5274418ce /src/corelib/global
parentd32fb5f1fe1abf6436ae14ac219dc05b8eb04098 (diff)
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>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp2
-rw-r--r--src/corelib/global/qlibraryinfo.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 0ae41cc48e..dc19ec0b98 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -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;
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index a7d44768c8..6753bf9121 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -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;