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:
Christophe Dumez 2012-08-19 11:46:50 +03:00
parent aecdc57cd4
commit d1e30cacf8
8 changed files with 58 additions and 61 deletions

View file

@ -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);