aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickxmllistmodel/data/roleKeys.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickxmllistmodel/data/roleKeys.qml')
-rw-r--r--tests/auto/quick/qquickxmllistmodel/data/roleKeys.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickxmllistmodel/data/roleKeys.qml b/tests/auto/quick/qquickxmllistmodel/data/roleKeys.qml
new file mode 100644
index 0000000000..9f667d86e5
--- /dev/null
+++ b/tests/auto/quick/qquickxmllistmodel/data/roleKeys.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+import QtQuick.XmlListModel 2.0
+
+XmlListModel {
+ query: "/data/item"
+ XmlRole { id: nameRole; name: "name"; query: "name/string()"; isKey: true }
+ XmlRole { name: "age"; query: "age/number()"; isKey: true }
+ XmlRole { name: "sport"; query: "sport/string()" }
+
+ function disableNameKey() {
+ nameRole.isKey = false;
+ }
+}