From b99b8388275b378a063665d631c7ef4e7a8f69c2 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 9 Sep 2007 17:02:12 +0000 Subject: [PATCH] - Fix in rss refresh and mark all as read --- src/rss.h | 6 +----- src/rss_imp.cpp | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rss.h b/src/rss.h index 017f86643..5e596e7f0 100644 --- a/src/rss.h +++ b/src/rss.h @@ -131,10 +131,6 @@ class RssStream : public QObject{ public slots : // read and store the downloaded rss' informations void processDownloadedFile(QString file_path) { - // delete the old file - if(QFile::exists(filePath)) { - QFile::remove(filePath); - } filePath = file_path; downloadFailure = false; openRss(); @@ -357,7 +353,7 @@ class RssStream : public QObject{ if(!fileRss.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug("openRss error : open failed, no file or locked, "+filePath.toUtf8()); if(QFile::exists(filePath)) { - fileRss.remove(); + fileRss.remove(); } return -1; } diff --git a/src/rss_imp.cpp b/src/rss_imp.cpp index 84f94301f..8aefd0ecb 100644 --- a/src/rss_imp.cpp +++ b/src/rss_imp.cpp @@ -120,6 +120,8 @@ } void RSSImp::on_actionMark_all_as_read_triggered() { + textBrowser->clear(); + listNews->clear(); QList selectedItems = listStreams->selectedItems(); QTreeWidgetItem* item; foreach(item, selectedItems){ @@ -128,6 +130,8 @@ feed->markAllAsRead(); item->setData(0, Qt::DisplayRole, feed->getAliasOrUrl()+ QString::fromUtf8(" (0)")); } + if(selectedItems.size()) + refreshNewsList(selectedItems.last(), 0); } //right-click somewhere, refresh all the streams