From 380989d8088c22bc455726c9e0f2cf4906635666 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 5 Oct 2011 18:54:06 +0300 Subject: [PATCH] RSS: Add more debug output --- src/rss/rssfeed.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/rss/rssfeed.cpp b/src/rss/rssfeed.cpp index 9e00b7e97..35d23205f 100644 --- a/src/rss/rssfeed.cpp +++ b/src/rss/rssfeed.cpp @@ -95,7 +95,10 @@ IRssFile::FileType RssFeed::type() const { } void RssFeed::refresh() { - if(m_loading) return; + if(m_loading) { + qWarning() << Q_FUNC_INFO << "Feed" << this->displayName() << "is already being refreshed, ignoring request"; + return; + } m_loading = true; // Download the RSS again RssManager::instance()->rssDownloader()->downloadUrl(m_url); @@ -351,25 +354,28 @@ bool RssFeed::parseXmlFile(const QString &file_path){ // read and store the downloaded rss' informations void RssFeed::handleFinishedDownload(const QString& url, const QString &file_path) { if(url == m_url) { + qDebug() << Q_FUNC_INFO << "Successfuly downloaded RSS feed at" << url; m_downloadFailure = false; m_loading = false; // Parse the download RSS if(parseXmlFile(file_path)) { m_refreshed = true; RssManager::instance()->forwardFeedInfosChanged(m_url, displayName(), unreadCount()); // XXX: Ugly + qDebug() << Q_FUNC_INFO << "Feed parsed successfuly"; } } else if(url == m_iconUrl) { m_icon = file_path; - qDebug() << "icon path:" << m_icon; + qDebug() << Q_FUNC_INFO << "icon path:" << m_icon; RssManager::instance()->forwardFeedIconChanged(m_url, m_icon); // XXX: Ugly } } void RssFeed::handleDownloadFailure(const QString &url, const QString& error) { - Q_UNUSED(error); if(url != m_url) return; m_downloadFailure = true; m_loading = false; RssManager::instance()->forwardFeedInfosChanged(m_url, displayName(), unreadCount()); // XXX: Ugly + qWarning() << "Failed to download RSS feed at" << url; + qWarning() << "Reason:" << error; }