From fa2d572d5d202b05ed1908ea1119a1995960ce1f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 23 May 2013 22:13:42 +0200 Subject: Fix QObject ownership Implement the JS vs. C++ ownership policy. QV4::WeakValue is a weak reference that's now used instead of PersistentValue in QQmlData. Whether or not to delete the QObject when the JS object is garbage collected is decided in the ~QObjectWrapper destructor (conveniently). Fixes four ownership tests. Change-Id: Iedeb498f510295b5e656d0bb3b324084efa98f0f Reviewed-by: Lars Knoll --- src/qml/qml/qqmldata_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/qml/qqmldata_p.h') diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h index 096e358a73..98407e53b5 100644 --- a/src/qml/qml/qqmldata_p.h +++ b/src/qml/qml/qqmldata_p.h @@ -179,7 +179,7 @@ public: unsigned int deferredIdx; quint32 v8objectid; - QV4::PersistentValue v8object; + QV4::WeakValue v8object; QQmlPropertyCache *propertyCache; -- cgit v1.2.3