diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-06-27 15:42:50 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-08-13 17:26:07 +0200 |
commit | 743fdd3fe7ad8d3cafa237a202c089fa6ff1c78c (patch) | |
tree | 6179cae00a71cd42960c36cd002e581bb78abc80 /tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp | |
parent | 730893c123cf30a94a494f1d292478d98f6095af (diff) |
QTextCodec: port to QRecursiveMutex
Write a local mutex locker for DRY. Use qt_unique_lock(Mutex*) because
we do not intend to add a QRecursiveMutexLocker and by Qt 6, the
current work-around where QMutexLocker works for QRecursiveMutex, too,
will be gone.
Could have used qt_scoped_lock, because no premature unlock() calls
are present, but it turns out the code attempts to take the mutex
after it's destroyed by Q_GLOBAL_STATIC, so we need QMutexLocker
compat, thus qt_unique_lock(Mutex*) instead of qt_scoped_lock(Mutex&).
Need to use decltype and using because auto doesn't work for NSDMs.
Change-Id: I8b0f8a3067f0a412279d075cb959105e485789cd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp')
0 files changed, 0 insertions, 0 deletions