RSS: Remove last singleton

This commit is contained in:
Christophe Dumez
2012-02-20 19:49:35 +02:00
parent a8a7b61ea9
commit 00b4ad6ec8
6 changed files with 22 additions and 33 deletions

View File

@@ -293,6 +293,7 @@ bool RssFeed::parseRSS(QIODevice* device) {
void RssFeed::downloadMatchingArticleTorrents() {
Q_ASSERT(RssSettings().isRssDownloadingEnabled());
RssDownloadRuleList *download_rules = m_manager->downloadRules();
for (RssArticleHash::ConstIterator it = m_articles.begin(); it != m_articles.end(); it++) {
RssArticlePtr item = it.value();
if (item->isRead()) continue;
@@ -302,7 +303,7 @@ void RssFeed::downloadMatchingArticleTorrents() {
else
torrent_url = item->link();
// Check if the item should be automatically downloaded
RssDownloadRulePtr matching_rule = RssDownloadRuleList::instance()->findMatchingRule(m_url, item->title());
RssDownloadRulePtr matching_rule = download_rules->findMatchingRule(m_url, item->title());
if (matching_rule) {
// Item was downloaded, consider it as Read
item->markAsRead();