mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
- Fix in rss refresh and mark all as read
This commit is contained in:
parent
c4d143c2c0
commit
b99b838827
@ -131,10 +131,6 @@ class RssStream : public QObject{
|
|||||||
public slots :
|
public slots :
|
||||||
// read and store the downloaded rss' informations
|
// read and store the downloaded rss' informations
|
||||||
void processDownloadedFile(QString file_path) {
|
void processDownloadedFile(QString file_path) {
|
||||||
// delete the old file
|
|
||||||
if(QFile::exists(filePath)) {
|
|
||||||
QFile::remove(filePath);
|
|
||||||
}
|
|
||||||
filePath = file_path;
|
filePath = file_path;
|
||||||
downloadFailure = false;
|
downloadFailure = false;
|
||||||
openRss();
|
openRss();
|
||||||
@ -357,7 +353,7 @@ class RssStream : public QObject{
|
|||||||
if(!fileRss.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
if(!fileRss.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
qDebug("openRss error : open failed, no file or locked, "+filePath.toUtf8());
|
qDebug("openRss error : open failed, no file or locked, "+filePath.toUtf8());
|
||||||
if(QFile::exists(filePath)) {
|
if(QFile::exists(filePath)) {
|
||||||
fileRss.remove();
|
fileRss.remove();
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -120,6 +120,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RSSImp::on_actionMark_all_as_read_triggered() {
|
void RSSImp::on_actionMark_all_as_read_triggered() {
|
||||||
|
textBrowser->clear();
|
||||||
|
listNews->clear();
|
||||||
QList<QTreeWidgetItem*> selectedItems = listStreams->selectedItems();
|
QList<QTreeWidgetItem*> selectedItems = listStreams->selectedItems();
|
||||||
QTreeWidgetItem* item;
|
QTreeWidgetItem* item;
|
||||||
foreach(item, selectedItems){
|
foreach(item, selectedItems){
|
||||||
@ -128,6 +130,8 @@
|
|||||||
feed->markAllAsRead();
|
feed->markAllAsRead();
|
||||||
item->setData(0, Qt::DisplayRole, feed->getAliasOrUrl()+ QString::fromUtf8(" (0)"));
|
item->setData(0, Qt::DisplayRole, feed->getAliasOrUrl()+ QString::fromUtf8(" (0)"));
|
||||||
}
|
}
|
||||||
|
if(selectedItems.size())
|
||||||
|
refreshNewsList(selectedItems.last(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//right-click somewhere, refresh all the streams
|
//right-click somewhere, refresh all the streams
|
||||||
|
Loading…
Reference in New Issue
Block a user