diff options
Diffstat (limited to 'src/corelib/io/qloggingregistry.cpp')
-rw-r--r-- | src/corelib/io/qloggingregistry.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp index 7849dfd14c..e8eb18b4c1 100644 --- a/src/corelib/io/qloggingregistry.cpp +++ b/src/corelib/io/qloggingregistry.cpp @@ -41,6 +41,7 @@ #include <QtCore/qfile.h> #include <QtCore/qlibraryinfo.h> +#include <QtCore/private/qlocking_p.h> #include <QtCore/qstandardpaths.h> #include <QtCore/qtextstream.h> #include <QtCore/qdir.h> @@ -356,7 +357,7 @@ void QLoggingRegistry::initializeRules() */ void QLoggingRegistry::registerCategory(QLoggingCategory *cat, QtMsgType enableForLevel) { - QMutexLocker locker(®istryMutex); + const auto locker = qt_scoped_lock(registryMutex); if (!categories.contains(cat)) { categories.insert(cat, enableForLevel); @@ -370,7 +371,7 @@ void QLoggingRegistry::registerCategory(QLoggingCategory *cat, QtMsgType enableF */ void QLoggingRegistry::unregisterCategory(QLoggingCategory *cat) { - QMutexLocker locker(®istryMutex); + const auto locker = qt_scoped_lock(registryMutex); categories.remove(cat); } @@ -413,7 +414,7 @@ void QLoggingRegistry::updateRules() QLoggingCategory::CategoryFilter QLoggingRegistry::installFilter(QLoggingCategory::CategoryFilter filter) { - QMutexLocker locker(®istryMutex); + const auto locker = qt_scoped_lock(registryMutex); if (!filter) filter = defaultCategoryFilter; |