aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlbinding/data
diff options
context:
space:
mode:
authorTobias Koenig <tobias.koenig@kdab.com>2015-09-24 10:24:20 +0200
committerTobias Koenig <tobias.koenig@kdab.com>2015-09-24 11:11:54 +0000
commit61ce37de40711ef2d4a6b4989d8183e1711fc47d (patch)
treede0826e4e555047e10fcb41d3871c3edba4649e8 /tests/auto/qml/qqmlbinding/data
parentfe7d35e3cbc7b6db42fbc66e26a63d321260cea0 (diff)
Improve warning for QtQml.Binding
Print a warning if there is no property with the given name of the specified target object, or the property is read-only. Change-Id: I5dc2e8330fb1ce53be396b7bf5baf13c1702d2f4 Task-number: QTBUG-39243 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmlbinding/data')
-rw-r--r--tests/auto/qml/qqmlbinding/data/readonlyProperty.qml13
-rw-r--r--tests/auto/qml/qqmlbinding/data/unknownProperty.qml11
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlbinding/data/readonlyProperty.qml b/tests/auto/qml/qqmlbinding/data/readonlyProperty.qml
new file mode 100644
index 0000000000..fa8d93d355
--- /dev/null
+++ b/tests/auto/qml/qqmlbinding/data/readonlyProperty.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+
+Item {
+ id: root
+
+ readonly property string name: "John"
+
+ Binding {
+ target: root
+ property: "name"
+ value: "Doe"
+ }
+}
diff --git a/tests/auto/qml/qqmlbinding/data/unknownProperty.qml b/tests/auto/qml/qqmlbinding/data/unknownProperty.qml
new file mode 100644
index 0000000000..36157bb4e7
--- /dev/null
+++ b/tests/auto/qml/qqmlbinding/data/unknownProperty.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.0
+
+Item {
+ id: root
+
+ Binding {
+ target: root
+ property: "unknown"
+ value: 42
+ }
+}