summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-04-25 16:42:11 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-05-09 07:48:30 +0000
commit0b1b06ffc0a334263c01e32e5bfb50b4d96ba70d (patch)
tree66f6a13e4551e4f4a11117d4b78d239109d9230c /src/corelib/thread/qmutex.cpp
parent75d65600f9fd41cb88068c664e3e94bb67eebc93 (diff)
Add a QMutex::isRecursive() const noexcept
This is source- and binary-compatible, including the marking of the existing function as noexcept. [ChangeLog][QtCore][QMutex] Made the isRecursive() method be a const function so that it can be called in const QMutex objects too. Change-Id: Ifea6e497f11a461db432ffff1448bead97c08f92 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/thread/qmutex.cpp')
-rw-r--r--src/corelib/thread/qmutex.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index 8d9fa82a7a..0b14ec31c2 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -282,19 +282,22 @@ void QMutex::unlock() Q_DECL_NOTHROW
unlockInternal();
}
+bool QBasicMutex::isRecursive() Q_DECL_NOTHROW
+{
+ return QT_PREPEND_NAMESPACE(isRecursive)(d_ptr.loadAcquire());
+}
+
/*!
- \fn void QMutex::isRecursive()
- \since 5.0
+ \overload
+ \since 5.7
Returns \c true if the mutex is recursive
-
*/
-bool QBasicMutex::isRecursive()
+bool QBasicMutex::isRecursive() const Q_DECL_NOTHROW
{
return QT_PREPEND_NAMESPACE(isRecursive)(d_ptr.loadAcquire());
}
-
/*!
\class QMutexLocker
\inmodule QtCore