aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-07-16 10:47:25 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2021-07-16 12:46:29 +0200
commit98e60bef156f1606c3cf83a64965c9688bdbea17 (patch)
tree63b1428ebcdc95bf94bc0ad7f0b347ed2bdde6f6 /src/qml/qml/qqmlengine.cpp
parentf88bfd0bf061914151e0e1cd408609e68c9ec00d (diff)
Replace QJSEnginePrivate::Locker with QMutexLocker
Since e04822f3c2a6b69b7d75e2039256aa2433c59dd2 it behaves exactly the same as QMutexLocker, and thus its class description was misleading and its implementation superfluous. Change-Id: Iba9b06e73d89314b9137914eb731eaee511058c0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 4eaf256eb4..b9fa75efb5 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -2131,7 +2131,7 @@ QQmlPropertyCache *QQmlEnginePrivate::rawPropertyCacheForType(
QQmlPropertyCache *QQmlEnginePrivate::findPropertyCacheInCompositeTypes(int t) const
{
- Locker locker(this);
+ QMutexLocker locker(&this->mutex);
auto iter = m_compositeTypes.constFind(t);
return (iter == m_compositeTypes.constEnd())
? nullptr
@@ -2142,7 +2142,7 @@ void QQmlEnginePrivate::registerInternalCompositeType(QV4::ExecutableCompilation
{
compilationUnit->isRegisteredWithEngine = true;
- Locker locker(this);
+ QMutexLocker locker(&this->mutex);
// The QQmlCompiledData is not referenced here, but it is removed from this
// hash in the QQmlCompiledData destructor
m_compositeTypes.insert(compilationUnit->typeIds.id.id(), compilationUnit);
@@ -2154,7 +2154,7 @@ void QQmlEnginePrivate::unregisterInternalCompositeType(QV4::ExecutableCompilati
{
compilationUnit->isRegisteredWithEngine = false;
- Locker locker(this);
+ QMutexLocker locker(&this->mutex);
m_compositeTypes.remove(compilationUnit->typeIds.id.id());
for (auto&& icDatum: compilationUnit->inlineComponentData)
m_compositeTypes.remove(icDatum.typeIds.id.id());
@@ -2162,7 +2162,7 @@ void QQmlEnginePrivate::unregisterInternalCompositeType(QV4::ExecutableCompilati
QV4::ExecutableCompilationUnit *QQmlEnginePrivate::obtainExecutableCompilationUnit(int typeId)
{
- Locker locker(this);
+ QMutexLocker locker(&this->mutex);
return m_compositeTypes.value(typeId, nullptr);
}