aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlinfo/data
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-07-23 17:29:11 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-07-27 14:43:48 +0200
commit31c892118ce822ca2e7ded99ff261187ce4cf597 (patch)
tree00cf756baee3542a263cec906056d7770f89117a /tests/auto/qml/qqmlinfo/data
parent9a204084fd4d68650dad7e0a018429cf0486c3a1 (diff)
QQmlInfo: print ancestor of object if it has no QML engine
This results in the following message for objects without a QML engine: QML AttachedObject (parent or ancestor of Attached): Binding loop detected for property "a" for this QML file, named AttachedObject.qml: import QtQuick 2.0 import org.qtproject.Test 1.0 Item { Attached.a: Attached.a } This, in turn, allows the warning to be emitted via the QQmlEngine::warnings signal, since QQmlEnginePrivate::warning() is now passed a valid engine. This solves the awkward situation where a binding loop warning can not be detected at all by auto tests involving attached C++ objects (as message handlers do not receive these messages either). Pick-to: 5.15 Change-Id: I07589974207bd5448d22a6086a52b9230d23e298 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlinfo/data')
-rw-r--r--tests/auto/qml/qqmlinfo/data/AttachedObject.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlinfo/data/AttachedObject.qml b/tests/auto/qml/qqmlinfo/data/AttachedObject.qml
new file mode 100644
index 0000000000..b714a10a1c
--- /dev/null
+++ b/tests/auto/qml/qqmlinfo/data/AttachedObject.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.0
+import org.qtproject.Test 1.0
+
+Item {
+ Attached.a: Attached.a
+
+ Rectangle {
+ width: height + 1
+ height: width + 1
+ }
+}