Ensure that dynamic property storing QObject ptr notifies on delete
authorChris Adams <christopher.adams@nokia.com>
Fri, 27 Jan 2012 01:33:37 +0000 (11:33 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 14 Mar 2012 23:22:45 +0000 (00:22 +0100)
commitb06108350b1390b51886474628e03e2e84640548
treebbf00677d9edc64e2549f2cc3ee42f1edd5a50f4
parenta27fd584df0ec3d1d072501d8fefe576a97a2e53
Ensure that dynamic property storing QObject ptr notifies on delete

Previously, when a QObject ptr was stored in a dynamic variant
property, the value of the property could change (to a zero ptr)
if the QObject was deleted without a notify signal being emitted
by the QDeclarativeVMEMetaObject which stores the property.

This commit ensures that such a notify signal is emitted correctly.

Task-number: QTBUG-23451
Change-Id: I5689abd984b177737f8d5f18950838b73ebde328
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/qml/qml/qqmlvmemetaobject.cpp
src/qml/qml/qqmlvmemetaobject_p.h
src/qml/qml/v8/qv8qobjectwrapper.cpp
tests/auto/qml/qqmlecmascript/data/dynamicDeletion.3.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp