summaryrefslogtreecommitdiffstats
path: root/examples/demos/rssnews/rssnews.qml
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2021-02-24 17:56:35 +0100
committerIvan Solovev <ivan.solovev@qt.io>2021-03-16 04:23:24 +0100
commit49073d33f13ffd6a710fc711d083af6049a05c6d (patch)
treeaacc06d69e91624a58079a6d40c18a80fcda1041 /examples/demos/rssnews/rssnews.qml
parent4e2a436c064ab1d60e1fc607f1b8fe82e3bd7357 (diff)
Update examples to use XmlListModel from QtDeclarative
Now when the XmlListModel is a part of QtDeclarative, we can udpate the examples, which were using the model. This patch introduces the following changes: - Uses XmlListModel from QtDeclarative, removes the custom implementation from shared subdir. - Improves photoviewer and rssnew examples to get rid of some qml and C++ warnings and deprecation notifications. - Updates the documentation for photoviewer and rssnew examples to reflect the usage of the XmlListModel from QtDeclarative. - Enables documentation build for rssnews example Task-number: QTBUG-89817 Change-Id: If3736a18070dc19492058f7c184d5c9cfab74663 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/demos/rssnews/rssnews.qml')
-rw-r--r--examples/demos/rssnews/rssnews.qml13
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/demos/rssnews/rssnews.qml b/examples/demos/rssnews/rssnews.qml
index 0bdd5f84f..85f56ae33 100644
--- a/examples/demos/rssnews/rssnews.qml
+++ b/examples/demos/rssnews/rssnews.qml
@@ -50,7 +50,7 @@
import QtQuick
import QtQuick.Window
-import XmlListModel
+import QtQml.XmlListModel
import "./content"
Rectangle {
@@ -76,13 +76,10 @@ Rectangle {
source: "https://" + window.currentFeed
query: "/rss/channel/item"
- roles: [
- XmlListModelRole { elementName: "title"; attributeName: ""},
- XmlListModelRole { elementName: "description"; attributeName: ""},
- XmlListModelRole { elementName: "content"; attributeName: "url" },
- XmlListModelRole { elementName: "link"; attributeName: "" },
- XmlListModelRole { elementName: "pubDate"; attributeName: "" }
- ]
+ XmlListModelRole { name: "title"; elementName: "title"; attributeName: ""}
+ XmlListModelRole { name: "content"; elementName: "content"; attributeName: "url" }
+ XmlListModelRole { name: "link"; elementName: "link"; attributeName: "" }
+ XmlListModelRole { name: "pubDate"; elementName: "pubDate"; attributeName: "" }
}
ListView {