diff options
Diffstat (limited to 'src/qml/qml/qqmltype.cpp')
-rw-r--r-- | src/qml/qml/qqmltype.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/qml/qqmltype.cpp b/src/qml/qml/qqmltype.cpp index 0b21cc22ee..ffb1e0ac4c 100644 --- a/src/qml/qml/qqmltype.cpp +++ b/src/qml/qml/qqmltype.cpp @@ -207,11 +207,11 @@ static bool isPropertyRevisioned(const QMetaObject *mo, int index) void QQmlTypePrivate::init() const { - if (isSetup) + if (isSetup.loadAcquire()) return; QMutexLocker lock(QQmlMetaType::typeRegistrationLock()); - if (isSetup) + if (isSetup.loadAcquire()) return; const QMetaObject *mo = baseMetaObject; @@ -265,17 +265,17 @@ void QQmlTypePrivate::init() const } } - isSetup = true; + isSetup.storeRelease(true); lock.unlock(); } void QQmlTypePrivate::initEnums(QQmlEnginePrivate *engine) const { - const QQmlPropertyCache *cache = (!isEnumFromCacheSetup && isComposite()) + const QQmlPropertyCache *cache = (!isEnumFromCacheSetup.loadAcquire() && isComposite()) ? compositePropertyCache(engine) : nullptr; - const QMetaObject *metaObject = !isEnumFromBaseSetup + const QMetaObject *metaObject = !isEnumFromBaseSetup.loadAcquire() ? baseMetaObject // beware: It could be a singleton type without metaobject : nullptr; @@ -288,12 +288,12 @@ void QQmlTypePrivate::initEnums(QQmlEnginePrivate *engine) const if (cache) { insertEnumsFromPropertyCache(cache); - isEnumFromCacheSetup = true; + isEnumFromCacheSetup.storeRelease(true); } if (metaObject) { insertEnums(metaObject); - isEnumFromBaseSetup = true; + isEnumFromBaseSetup.storeRelease(true); } } |