aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/bindingLoopEagerEager.qml
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-10-20 15:41:04 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2021-01-25 11:21:42 +0100
commit9eda73354c6caf0b974febc7bdbee136d59a4e36 (patch)
treea940d5b2fe8d052a19ee80259fd10457e76ff411 /tests/auto/qml/qqmlecmascript/data/bindingLoopEagerEager.qml
parent4f961f1f580bca602e1c4e8fffd906edb374d03d (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.qml6
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
+}