From f9261feb16d02e985982dd46783ea54c2cfce91b Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 2 Nov 2011 14:28:02 +0000 Subject: Skip the captured properties step in bindings Objects and notifiers in the capturedProperties list were not guarded which can lead to crashes if they're deleted prior to the binding completing. Now the notifiers are connected to and guarded immediately to prevent this. Change-Id: I912e323c52bf6169fb5077e552d5d38d9aa7faec Reviewed-by: Roberto Raggi --- .../qdeclarativeecmascript/data/deleteWhileBindingRunning.qml | 5 +++++ .../auto/declarative/qdeclarativeecmascript/data/nonNotifyable.qml | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/deleteWhileBindingRunning.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/nonNotifyable.qml (limited to 'tests/auto/declarative/qdeclarativeecmascript/data') diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deleteWhileBindingRunning.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deleteWhileBindingRunning.qml new file mode 100644 index 0000000000..b5cc59e2c0 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/deleteWhileBindingRunning.qml @@ -0,0 +1,5 @@ +import Qt.test 1.0 + +MyDeleteObject { + property int result: nestedObject.intProperty + deleteNestedObject +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonNotifyable.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nonNotifyable.qml new file mode 100644 index 0000000000..2b8b113c34 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/nonNotifyable.qml @@ -0,0 +1,6 @@ +import Qt.test 1.0 + +MyQmlObject { + id: root + property int test: root.value +} -- cgit v1.2.3