mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 12:00:16 -07:00
Move RSS parsing to another thread to avoid freezing the UI
RSS items are now displayed as soon as they have been parsed instead of displaying all of them in one batch once the whole feed is parsed. First step to address issue #34.
This commit is contained in:
parent
820d94e014
commit
c50c9239ea
10 changed files with 529 additions and 374 deletions
|
@ -402,17 +402,17 @@ void RSSImp::refreshSelectedItems() {
|
|||
// Update icons
|
||||
if (item == m_feedList->stickyUnreadItem()) {
|
||||
foreach (QTreeWidgetItem *feed, m_feedList->getAllFeedItems()) {
|
||||
feed->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png")));
|
||||
feed->setData(0, Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png")));
|
||||
}
|
||||
file->refresh();
|
||||
break;
|
||||
} else {
|
||||
if (qSharedPointerDynamicCast<RssFeed>(file)) {
|
||||
item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png")));
|
||||
item->setData(0, Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png")));
|
||||
} else if (qSharedPointerDynamicCast<RssFolder>(file)) {
|
||||
// Update feeds in the folder
|
||||
foreach (QTreeWidgetItem *feed, m_feedList->getAllFeedItems(item)) {
|
||||
feed->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png")));
|
||||
feed->setData(0, Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue