mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Keep RSS articles sorted by date in memory do avoid sorting them all the time
Optimization to address issue #34.
This commit is contained in:
parent
aecdc57cd4
commit
d1e30cacf8
8 changed files with 58 additions and 61 deletions
|
@ -151,15 +151,6 @@ void RssManager::saveStreamList() const {
|
|||
settings.setRssFeedsAliases(aliases);
|
||||
}
|
||||
|
||||
static bool laterItemDate(const RssArticlePtr& a, const RssArticlePtr& b)
|
||||
{
|
||||
return (a->date() > b->date());
|
||||
}
|
||||
|
||||
void RssManager::sortArticleListByDateDesc(RssArticleList& news_list) {
|
||||
qSort(news_list.begin(), news_list.end(), laterItemDate);
|
||||
}
|
||||
|
||||
RssDownloadRuleList *RssManager::downloadRules() const
|
||||
{
|
||||
Q_ASSERT(m_downloadRules);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue