diff options
Diffstat (limited to 'src/qml/qml/qqmlpropertycache_p.h')
-rw-r--r-- | src/qml/qml/qqmlpropertycache_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index b78a2ddd20..0785910cec 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -979,13 +979,13 @@ public: void append(QQmlPropertyCache *cache) { cache->addref(); data.append(cache); } QQmlPropertyCache *at(int index) const { return data.at(index).data(); } - void set(int index, QQmlPropertyCache *replacement) { + void set(int index, const QQmlRefPointer<QQmlPropertyCache> &replacement) { if (QQmlPropertyCache *oldCache = data.at(index).data()) { - if (replacement == oldCache) + if (replacement.data() == oldCache) return; oldCache->release(); } - data[index] = replacement; + data[index] = replacement.data(); replacement->addref(); } |