aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickxmllistmodel/data/roleErrors.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickxmllistmodel/data/roleErrors.qml')
-rw-r--r--tests/auto/quick/qquickxmllistmodel/data/roleErrors.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickxmllistmodel/data/roleErrors.qml b/tests/auto/quick/qquickxmllistmodel/data/roleErrors.qml
new file mode 100644
index 0000000000..91664b6d4a
--- /dev/null
+++ b/tests/auto/quick/qquickxmllistmodel/data/roleErrors.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.0
+import QtQuick.XmlListModel 2.0
+
+XmlListModel {
+ source: "model.xml"
+ query: "/Pets/Pet"
+ XmlRole { name: "name"; query: "/name/string()" } //starts with '/'
+ XmlRole { name: "type"; query: "type" } //no type
+ XmlRole { name: "age"; query: "age/" } //ends with '/'
+ XmlRole { name: "size"; query: "size/number()" } //wrong type
+}