aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmetatypedata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlmetatypedata.cpp')
-rw-r--r--src/qml/qml/qqmlmetatypedata.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlmetatypedata.cpp b/src/qml/qml/qqmlmetatypedata.cpp
index c5b9ae1a15..989f1adf7c 100644
--- a/src/qml/qml/qqmlmetatypedata.cpp
+++ b/src/qml/qml/qqmlmetatypedata.cpp
@@ -129,12 +129,15 @@ QQmlPropertyCache *QQmlMetaTypeData::propertyCache(const QQmlType &type, int min
int rev = currentType.metaObjectRevision();
int moIndex = types.count() - 1 - ii;
- if (raw->allowedRevisionCache[moIndex] != rev) {
+ if (raw->allowedRevision(moIndex) != rev) {
if (!hasCopied) {
+ // TODO: The copy should be mutable, and the original should be const
+ // Considering this, the setAllowedRevision() below does not violate
+ // the immutability of already published property caches.
raw = raw->copy();
hasCopied = true;
}
- raw->allowedRevisionCache[moIndex] = rev;
+ raw->setAllowedRevision(moIndex, rev);
}
}