From 4732c8565dbbe6d3a9719f08b70ad2c2c56b0a91 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 7 Jan 2010 18:42:47 +0000 Subject: [PATCH] - Refresh RSS feed as soon as feed downloader is enabled --- src/feeddownloader.h | 5 +++++ src/rss_imp.cpp | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/feeddownloader.h b/src/feeddownloader.h index 397c30b42..ca573f9e1 100644 --- a/src/feeddownloader.h +++ b/src/feeddownloader.h @@ -271,6 +271,8 @@ public: } ~FeedDownloaderDlg() { + if(enableDl_cb->isChecked()) + emit filteringEnabled(); // Make sure we save everything saveCurrentFilterSettings(); filters.save(); @@ -501,6 +503,9 @@ protected slots: QMessageBox::warning(0, tr("Export failure"), tr("Filters could not be exported due to an I/O error.")); } +signals: + void filteringEnabled(); + }; #undef QHash diff --git a/src/rss_imp.cpp b/src/rss_imp.cpp index c74420032..c93fe010d 100644 --- a/src/rss_imp.cpp +++ b/src/rss_imp.cpp @@ -374,8 +374,10 @@ void RSSImp::copySelectedFeedsURL() { void RSSImp::showFeedDownloader() { QTreeWidgetItem* item = listStreams->selectedItems()[0]; RssFile* rss_item = listStreams->getRSSItem(item); - if(rss_item->getType() == RssFile::STREAM) - new FeedDownloaderDlg(this, listStreams->getItemID(item), rss_item->getName(), BTSession); + if(rss_item->getType() == RssFile::STREAM) { + FeedDownloaderDlg* feedDownloader = new FeedDownloaderDlg(this, listStreams->getItemID(item), rss_item->getName(), BTSession); + connect(feedDownloader, SIGNAL(filteringEnabled()), this, SLOT(on_updateAllButton_clicked())); + } } void RSSImp::on_markReadButton_clicked() {