aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qobjectwrapper.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-12-07 17:41:33 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-01-03 15:58:37 +0100
commit7db241834aa9c5070a0f13914cf6cd46b453d0ff (patch)
tree2548197c9e27d63f008218f72e986f10539f727e /src/qml/jsruntime/qv4qobjectwrapper.cpp
parentd74e931f3fc2587ac6d1e2930acbbe54ea5be2b5 (diff)
Unify PropertyCache refcounting
We should not keep plain QQmlPropertyCache pointers around. Also optimize self-assignment of QQmlRefPointer. Change-Id: I0e30b4ce29bb6b7acf288a9dc7b515d0e8f4ddfe Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 9e30225d3c..34994bd0e6 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -764,7 +764,7 @@ bool QObjectWrapper::virtualIsEqualTo(Managed *a, Managed *b)
ReturnedValue QObjectWrapper::create(ExecutionEngine *engine, QObject *object)
{
if (QJSEngine *jsEngine = engine->jsEngine()) {
- if (QQmlPropertyCache *cache = QQmlData::ensurePropertyCache(jsEngine, object).data()) {
+ if (QQmlRefPointer<QQmlPropertyCache> cache = QQmlData::ensurePropertyCache(jsEngine, object)) {
ReturnedValue result = QV4::Encode::null();
void *args[] = { &result, &engine };
if (cache->callJSFactoryMethod(object, args))