diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-10 20:42:55 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-10 20:42:55 (GMT) |
commit | 0afb2e2ba1b3a83e888b8b584c14e92dffb02596 (patch) | |
tree | eded7c252bf19b1f60cbbec993c7e6b76c13d327 /src/declarative/util/qdeclarativexmllistmodel.cpp | |
parent | 497da277770ccf37e05a7b519afd5206601a7cf1 (diff) | |
parent | 1546eeb7379ba7805c9f1a467fbc7e31dd377bab (diff) | |
download | Qt-0afb2e2ba1b3a83e888b8b584c14e92dffb02596.zip Qt-0afb2e2ba1b3a83e888b8b584c14e92dffb02596.tar.gz Qt-0afb2e2ba1b3a83e888b8b584c14e92dffb02596.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (42 commits)
Update on color change.
Update on color change.
Add go button to webbrowser example.
Remove 'XXX Experimental' from VisualItemModel/VisualDataModel and
Document attached properties
Add 'on' prefix to documentation of signals
Stablize qmlviewer test
Improve test stability.
qmlviewer: ensure that only clicks on the current file list are handled.
Doc improvements: move some example code to snippets, add screenshots,
Move some example code into snippets/ and add other doc fixes
Fix crash when changing ListView model with highlightRangeMode: ListView.StrictlyEnforceRange
Fix GridView bounds behavior with snapping enabled.
Small optimization when checking if MouseArea's onPressAndHold is
Fix autotest.
Fixed `nmake clean' breaking declarative imports on Windows.
Fix drawing flicker on Qml Viewer startup
Fix snake demo
Add qmlmethod Item::childAt() to delarative item
Cursor positioning in QTextDocument after undo()
...
Diffstat (limited to 'src/declarative/util/qdeclarativexmllistmodel.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativexmllistmodel.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 4f9355b..4adef25 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -523,10 +523,13 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla A XmlListModel could create a model from this data, like this: \qml + import Qt 4.7 + XmlListModel { id: xmlModel source: "http://www.mysite.com/feed.xml" query: "/rss/channel/item" + XmlRole { name: "title"; query: "title/string()" } XmlRole { name: "pubDate"; query: "pubDate/string()" } } @@ -536,7 +539,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla a model item for each \c <item> in the XML document. The XmlRole objects define the - model item attributes; here, each model item will have \c title and \c pubDate + model item attributes. Here, each model item will have \c title and \c pubDate attributes that match the \c title and \c pubDate values of its corresponding \c <item>. (See \l XmlRole::query for more examples of valid XPath expressions for XmlRole.) @@ -672,11 +675,11 @@ void QDeclarativeXmlListModel::setSource(const QUrl &src) /*! \qmlproperty string XmlListModel::xml - This property holds XML text set directly. + This property holds the XML data for this model, if set. The text is assumed to be UTF-8 encoded. - If both source and xml are set, xml will be used. + If both \l source and \c xml are set, \c xml will be used. */ QString QDeclarativeXmlListModel::xml() const { @@ -733,6 +736,7 @@ void QDeclarativeXmlListModel::setQuery(const QString &query) source: "http://mysite.com/feed.xml" query: "/feed/entry" namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';" + XmlRole { name: "title"; query: "title/string()" } } \endqml |