Update QMutexLocker documentation

And add an entry about the API changes to qt6-changed.qdoc.

Pick-to: 6.0
Task-number: QTBUG-89429
Change-Id: I146574acd3e4aa5ed6f1629fc68888f009472f19
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Lars Knoll 2020-12-14 09:05:01 +01:00
parent 37e26d2b30
commit 92db806aa8
3 changed files with 11 additions and 2 deletions

View File

@ -184,7 +184,7 @@ int complexFunction(int flag)
class SignalWaiter
{
private:
QMutexLocker locker;
QMutexLocker<QMutex> locker;
public:
SignalWaiter(QMutex *mutex)

View File

@ -392,6 +392,15 @@
}
\endcode
\section1 QMutex and Related Classes
In Qt 6, QRecursiveMutex does not inherit from QMutex anymore. This change was
done to improve the performance of both QMutex and QRecursiveMutex.
Due to those changes, the QMutex::RecursionMode enum has been removed, and
QMutexLocker is now a templated class that can operate on both QMutex and
QRecursiveMutex.
\section1 QFuture and Related Classes
\section2 QFuture

View File

@ -415,7 +415,7 @@ void QRecursiveMutex::unlock() noexcept
/*!
\class QMutexLocker
\class template <typename Mutex> QMutexLocker
\inmodule QtCore
\brief The QMutexLocker class is a convenience class that simplifies
locking and unlocking mutexes.