From 1c6ef50b773383a660c1d5b6e9e29194c4f4948e Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 11 Jul 2012 18:17:27 +0300 Subject: [PATCH] Add more RSS debug --- src/rss/rssfeed.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/rss/rssfeed.cpp b/src/rss/rssfeed.cpp index 459ad600c..06a43409c 100644 --- a/src/rss/rssfeed.cpp +++ b/src/rss/rssfeed.cpp @@ -211,6 +211,7 @@ QString RssFeed::iconUrl() const { void RssFeed::parseRSSChannel(QXmlStreamReader& xml) { + qDebug() << Q_FUNC_INFO; Q_ASSERT(xml.isStartElement() && xml.name() == "channel"); while (xml.readNextStartElement()) { @@ -234,8 +235,10 @@ void RssFeed::parseRSSChannel(QXmlStreamReader& xml) article->markAsRead(); m_articles[guid] = article; } - } else + } else { + qDebug() << "Skipping RSS tag: " << xml.name(); xml.skipCurrentElement(); + } } } @@ -262,8 +265,12 @@ bool RssFeed::parseRSS(QIODevice* device) xml.skipCurrentElement(); } + if (xml.error()) { + qWarning() << "Error parsing RSS document: " << xml.errorString(); + } + if (!found_channel) { - qDebug() << m_url << " is not a valid RSS feed"; + qWarning() << m_url << " is not a valid RSS feed"; return false; }