aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2014-03-17 09:37:31 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-18 12:00:58 +0100
commitb456fb1a11302557ac51ac47c635ba993d1653a3 (patch)
tree76417df2d7ec3cd5e108707f5b2fc193def505a2 /src/quick/doc
parent17643c829d15d43a7d5e2955089595198903775c (diff)
Doc: Reintroduce missing sample XML file for XMLRole documentation
XMLRole documentation talks about sample XML content, but erraenously quoted a QML file instead. This change brings back the sample file from Qt 4.8, and updates it to cover the use of boolean role. Change-Id: Id71550fab15c761320551f6583a138cd7cc88376 Reviewed-by: Bea Lam <bea.lam@jollamobile.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/quick/doc')
-rw-r--r--src/quick/doc/snippets/qml/xmlrole.qml6
-rw-r--r--src/quick/doc/snippets/qml/xmlrole.xml20
2 files changed, 24 insertions, 2 deletions
diff --git a/src/quick/doc/snippets/qml/xmlrole.qml b/src/quick/doc/snippets/qml/xmlrole.qml
index b1fb674e3e..257594179a 100644
--- a/src/quick/doc/snippets/qml/xmlrole.qml
+++ b/src/quick/doc/snippets/qml/xmlrole.qml
@@ -52,7 +52,7 @@ XmlListModel {
//![1]
// XmlRole queries will be made on <book> elements
- query: "/catalogue/book"
+ query: "/catalog/book"
// query the book title
XmlRole { name: "title"; query: "title/string()" }
@@ -71,14 +71,16 @@ XmlListModel {
}
//![1]
+//![2]
ListView {
width: 300; height: 200
model: model
delegate: Column {
- Text { text: title + " (" + type + ")"; font.bold: true }
+ Text { text: title + " (" + type + ")"; font.bold: wanted }
Text { text: first_author }
Text { text: year }
}
+//![2]
}
}
diff --git a/src/quick/doc/snippets/qml/xmlrole.xml b/src/quick/doc/snippets/qml/xmlrole.xml
new file mode 100644
index 0000000000..70280e067d
--- /dev/null
+++ b/src/quick/doc/snippets/qml/xmlrole.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<catalog>
+ <book type="Online" wanted="true">
+ <title>Qt 5 Cadaques</title>
+ <year>2014</year>
+ <author>Juergen Bocklage-Ryannel</author>
+ <author>Johan Thelin</author>
+ </book>
+ <book type="Hardcover">
+ <title>C++ GUI Programming with Qt 4</title>
+ <year>2006</year>
+ <author>Jasmin Blanchette</author>
+ <author>Mark Summerfield</author>
+ </book>
+ <book type="Paperback">
+ <title>Programming with Qt</title>
+ <year>2002</year>
+ <author>Matthias Kalle Dalheimer</author>
+ </book>
+ </catalog>