Fix potential crash and leak in Binding.
authorMichael Brasser <michael.brasser@nokia.com>
Wed, 9 May 2012 00:25:20 +0000 (10:25 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 May 2012 03:38:22 +0000 (05:38 +0200)
commit54679f48eff344d2dde8d6d4d748b2db497fb29e
treebe8f19f9888762e23666a787e5a6c20bc609ce99
parentf9eb1d4ed610b6a96a247d9da7316ed8b83a077b
Fix potential crash and leak in Binding.

With this patch, Binding will always correctly restore the original
binding when it becomes inactive (previously it would sometimes restore
a deleted binding). In the future we may want to consider changing to
retore the most recently set binding instead (it's currently unclear
whether either is a better model).

Change-Id: Iddde49de0815b2334ec3369963048554d1c8e105
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
src/quick/util/qquickbind.cpp
tests/auto/qml/qquickbinding/data/restoreBindingWithoutCrash.qml [new file with mode: 0644]
tests/auto/qml/qquickbinding/tst_qquickbinding.cpp