aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-02-14 14:18:01 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-16 17:17:26 +0100
commit464bd2bf975797241213191a374e70431c5c3763 (patch)
treed4f046b69b32ed7353583caa84c78fca564e8bf1 /src/quick/scenegraph/qsgcontext_p.h
parent60d66bea87b72e66e7c466e1c27f966762e1fd5a (diff)
Fix spurious binding loop errors in QtQuick Controls and other places
Commit 5dc7649f5ad7dca6e13707e827d001c3f118a6ef caused this regression, as a result of lazy binding evaluation and self-referencing objects: import QtQml 2.0 QtObject { property QtObject objectRef : subObject property QtObject blah: QtObject { id: subObject property int value: 42 property int blah: objectRef.value } } When blah is evaluated, we now lazily initialize objectRef - as opposed to previously throwing an exception and then when objectRef gets initialized we re-evaluate blah due to its dependency. So while evaluating "objectRef.value" for blah, we initialize objectRef by evaluating "subObject", and after doing that we write the "objectRef" property. That triggers a change notification, and since the objectRef reference for blah is a compile-time known dependency, the change notification triggers a re-evaluation of "blah", which is the binding loop. What's wrong here is that we register the pre-defined captures before the code execution, when we should register them after the evaluation, or strictly speaking after flushing pending bindings, like it is the case for individual properties in bindings where we could not pre-determine the depenencies. Change-Id: I9fb0c7583cba9d9b71c9ada2791fe87574f6ef44 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext_p.h')
0 files changed, 0 insertions, 0 deletions