summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-03-06 14:31:49 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-03-15 03:32:14 +0100
commit9b8015ed8d4dcfc3ac3dd15fb5a2edf16ff639db (patch)
tree1b301b286ff19e6605860ab4744e49dbe4c8ccf1 /src/corelib/thread/qmutex.cpp
parent07b176ce70009f62fbce603c0495fa36c23b10d7 (diff)
QMutexLocker: add isLocked()
It's basically for free. [ChangeLog][QtCore][QMutexLocker] Added the isLocked() function. Change-Id: Idad5fa249ba8f135dcf81c7b7596caa3a888e99c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qmutex.cpp')
-rw-r--r--src/corelib/thread/qmutex.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index ba97ef8a42..dec0a95c47 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -495,6 +495,14 @@ void QRecursiveMutex::unlock() noexcept
*/
/*!
+ \fn template <typename Mutex> bool QMutexLocker<Mutex>::isLocked() const noexcept
+ \since 6.4
+
+ Returns true if this QMutexLocker is currently locking its associated
+ mutex, or false otherwise.
+*/
+
+/*!
\fn template <typename Mutex> void QMutexLocker<Mutex>::unlock() noexcept
Unlocks this mutex locker. You can use \c relock() to lock