Ensure binding target has not been deleted
authorMatthew Vogt <matthew.vogt@nokia.com>
Thu, 26 Apr 2012 23:15:11 +0000 (09:15 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 4 May 2012 03:51:29 +0000 (05:51 +0200)
commit186abc1e085e4fae7631e329f44e68a810bca38b
treeab4ca7211a2a9f788f8790e52579396762ad4213
parent9ae289f259f80458caf7c788ee07357db7e1257a
Ensure binding target has not been deleted

Prevent the evaluation of bindings if the target has been deleted.
Also, mark an item as queued for deletion at the beginning of the
destructor call chain, so that bindings triggered by the operation
of the destructor itself are not evaluated (after the context is
destructed, if necessary).

Task-number: QTBUG-25516
Change-Id: I587ef7923eb749eb7980156ad73822c1fb7c1ff3
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/qml/qml/qqmlbinding.cpp
src/qml/qml/qqmldata_p.h
src/qml/qml/qqmlengine.cpp
src/qml/qml/v4/qv4bindings.cpp
src/qml/qml/v8/qv8bindings.cpp
tests/auto/qml/qqmlecmascript/data/ContainerComponent.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/ContentComponent.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/data/bindingSuppression.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp