diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-13 16:01:59 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-16 10:56:08 +0000 |
commit | 3fa8540800c43ccc4e4c1f8f323fb5ade34044db (patch) | |
tree | 9cf577444246737fa28f7e5eac8bb782b5f6e16e /src/qml/qml/qqmlimport.cpp | |
parent | b91569219b901480eb09d648357485e3d9dbf3d1 (diff) |
Changed QML type locking
Replace the use of QReadWriteLock with a plain QMutex. At this point
QReadWriteLock adds a lot of overhead due to its internal QHash and otherwise
offers little over a recursive mutex, especially given that there is most
of the time only one reading thread and one writing thread.
Change-Id: I0a91e4a64cff5d25e4a133ed46b08912e81bb055
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 6a5cab02fd..906e073cab 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1829,7 +1829,7 @@ bool QQmlImportDatabase::registerPluginTypes(QObject *instance, const QString &b { // Create a scope for QWriteLocker to keep it as narrow as possible, and // to ensure that we release it before the call to initalizeEngine below - QWriteLocker lock(QQmlMetaType::typeRegistrationLock()); + QMutexLocker lock(QQmlMetaType::typeRegistrationLock()); if (!typeNamespace.isEmpty()) { // This is an 'identified' module |