diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-09-30 11:55:31 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-10-06 00:25:37 +0000 |
commit | a038dadf770ddb2697e8404741235317cf2a6674 (patch) | |
tree | 0e36faca0ec8348de7bac62914e199f9c343d7b0 /examples/quick/draganddrop | |
parent | b3ff3fd2c41adb082a51897fbc02789c488c9a06 (diff) |
QQmlObjectCreator: Correctly remove overwritten bindings
For QProperty bindings, we would not explicitly remove bindings that were
added and later overwritten.
For "complex" bindings, that would cause some unnecessary binding
evaluation during object creation.
Worse, in the case of a literal binding overwriting a complex binding,
we would acutally end up with the complex binding still being there,
because the literal binding would result in an immediate write of the
value, whereas the binding was only installed at a later point.
We fix this by removing the binding from the list of to-be-installed
bindings when it gets overwritten.
We also now take the IsPropertyObserver flag into consideration when
checking whether existing bindings should be removed: IsPropertyObserver
is basically the same as IsSignalHandlerExpression, but for QProperty
bindings instead of "old-style" bindings.
Fixes: QTBUG-96668
Change-Id: I2ef00d5b62af4f6fcc71960c38e1f0568b3b9c40
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 5ff83606a1c1365b95cd12ef9d45bc4e4eb13ecd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quick/draganddrop')
0 files changed, 0 insertions, 0 deletions