diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-10-20 15:41:04 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-01-25 11:21:42 +0100 |
commit | 9eda73354c6caf0b974febc7bdbee136d59a4e36 (patch) | |
tree | a940d5b2fe8d052a19ee80259fd10457e76ff411 /tests/auto/qml/qqmlecmascript/data/bindingLoopEagerEager.qml | |
parent | 4f961f1f580bca602e1c4e8fffd906edb374d03d (diff) |
QQmlPropertyBinding: improve error reporting
This change ensures that bindings created in QML between new-style
properties contain information about which property caused the loop. To
do this, we store additional information about the property involved to
retrieve its name and position at a later point. We print the warning in
case we detect a binding loop in evaluate, and also set the error
reporting callback correctly, so that the condition can be reported when
the loop is detected in another part of the binding evaluation.
In addition, we do not only set the QPropertyBinding's error member when
JS evaluation results in an error, but also print the warning with
qmlWarning.
Fixes: QTBUG-87733
Change-Id: Idb25237d1f57355ca31189e6bf2a918430b3a810
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/bindingLoopEagerEager.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/bindingLoopEagerEager.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/bindingLoopEagerEager.qml b/tests/auto/qml/qqmlecmascript/data/bindingLoopEagerEager.qml new file mode 100644 index 0000000000..a320ba56e6 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/bindingLoopEagerEager.qml @@ -0,0 +1,6 @@ +import test + +BindingLoop { + eager1: eager2+1 + eager2: eager1+1 +} |