Fix edge case in signal emission semantics
authorChris Adams <christopher.adams@nokia.com>
Tue, 1 May 2012 02:11:45 +0000 (12:11 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 8 May 2012 22:56:16 +0000 (00:56 +0200)
commit029e510256a1a6ea8f30db75fa0745cad01353cb
treeafee148629983a2490b8ab176dcb050dfc27bd29
parent68b899266ca209d43026376a6cf9d7bbdc3483b8
Fix edge case in signal emission semantics

Signal emission triggered by property changes during an onDestruction
handler was previously not well tested.  This commit adds several
unit tests to ensure correct behaviour in that situation.

Those unit tests showed a problem in signal emission related to when
children objects are cleaned up.  This commit also ensures that if
such children own their own context, their onDestruction handlers
are called prior to marking the child as deleted.

Change-Id: Ibf84ae56ba1134e5d6402b742aee1bdc0e5e4e15
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
src/qml/qml/qqmldata_p.h
src/qml/qml/qqmlengine.cpp
tests/auto/qml/qqmlecmascript/data/SignalEmittedComponent.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/signalEmitted.2.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/signalEmitted.3.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/signalEmitted.4.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/signalEmitted.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/testtypes.h
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp