diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-03-10 12:49:35 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-03-18 22:56:54 +0100 |
commit | b5b5782088c25c67f090500d71fa1ae655383553 (patch) | |
tree | d14d054d570eefa303f80e6ce59ea076f43c1bb1 /src/qml/qml/qqmltypecompiler.cpp | |
parent | 7b8e6714e1e9707091898eba92f099c664879e80 (diff) |
QML: Add more safety to QQmlPropertyCache usages
We can almost always use QQmlPropertyCache::ConstPtr. The property cache
creator needs mutable property caches for a while, but it can seal them
when done. The designer integration does ugly stuff, but that should be
limited to a specific environment. And the QQmlOpenMetaObject is rather
wrong (again). This needs to be addresses in a later change.
Task-number: QTBUG-73271
Change-Id: I1c31fd5936c745029d25b909c30b8d14a30f25d3
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypecompiler.cpp')
-rw-r--r-- | src/qml/qml/qqmltypecompiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltypecompiler.cpp b/src/qml/qml/qqmltypecompiler.cpp index 60b42fee1d..617e478e57 100644 --- a/src/qml/qml/qqmltypecompiler.cpp +++ b/src/qml/qml/qqmltypecompiler.cpp @@ -855,7 +855,7 @@ void QQmlComponentAndAliasResolver::findAndRegisterImplicitComponents( qmlObjects->append(syntheticComponent); const int componentIndex = qmlObjects->count() - 1; // Keep property caches symmetric - QQmlRefPointer<QQmlPropertyCache> componentCache + QQmlPropertyCache::ConstPtr componentCache = QQmlMetaType::propertyCache(&QQmlComponent::staticMetaObject); propertyCaches.append(componentCache); |