From b26391d58500aebbb3f3328c5a16e6b438fd65d9 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Thu, 16 Jul 2015 19:32:30 +0200 Subject: [PATCH] LP-26 Show forum news on the welcome page --- .../src/plugins/welcome/qml/NewsPanel.qml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml b/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml index 0e6a8ef99..009ba2d70 100644 --- a/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml +++ b/ground/openpilotgcs/src/plugins/welcome/qml/NewsPanel.qml @@ -35,12 +35,13 @@ Item { XmlListModel { id: xmlModel - source: "http://www.openpilot.org/feed/" - query: "/rss/channel/item" + source: "http://forum.librepilot.org/index.php?board=11.0&action=.xml&type=atom&sa=news" + query: "/feed/entry" + namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';" XmlRole { name: "title"; query: "title/string()" } - XmlRole { name: "description"; query: "description/string()" } - XmlRole { name: "link"; query: "link/string()" } + XmlRole { name: "description"; query: "summary/string()" } + XmlRole { name: "link"; query: "link/@href/string()" } } Component { @@ -64,7 +65,7 @@ Item { Text { text: description width: view.width - 4 - textFormat: text.indexOf("&") > 0 ? Text.StyledText : Text.PlainText + textFormat: Text.RichText maximumLineCount: 3 wrapMode: Text.WordWrap elide: Text.ElideRight