mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Rss code clean up
This commit is contained in:
parent
74c32a0ecd
commit
7f0c8dde24
@ -183,11 +183,11 @@ uint RssFeed::unreadCount() const{
|
||||
return nbUnread;
|
||||
}
|
||||
|
||||
QList<RssArticle> RssFeed::articleList() const{
|
||||
const QList<RssArticle> RssFeed::articleList() const{
|
||||
return m_articles.values();
|
||||
}
|
||||
|
||||
QList<RssArticle> RssFeed::unreadArticleList() const {
|
||||
const QList<RssArticle> RssFeed::unreadArticleList() const {
|
||||
QList<RssArticle> unread_news;
|
||||
foreach(const RssArticle &item, m_articles.values()) {
|
||||
if(!item.isRead())
|
||||
@ -344,7 +344,6 @@ void RssFeed::handleFinishedDownload(const QString& url, const QString &file_pat
|
||||
m_icon = file_path;
|
||||
qDebug() << "icon path:" << m_icon;
|
||||
RssManager::instance()->forwardFeedIconChanged(m_url, m_icon); // XXX: Ugly
|
||||
emit iconUpdated(m_icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,9 @@ public:
|
||||
uint count() const;
|
||||
void markAsRead();
|
||||
uint unreadCount() const;
|
||||
QList<RssArticle> articleList() const;
|
||||
const QList<RssArticle> articleList() const;
|
||||
const QHash<QString, RssArticle>& articleListNoCopy() const { return m_articles; }
|
||||
QList<RssArticle> unreadArticleList() const;
|
||||
|
||||
signals:
|
||||
void iconUpdated(const QString &icon);
|
||||
const QList<RssArticle> unreadArticleList() const;
|
||||
|
||||
private slots:
|
||||
void handleFinishedDownload(const QString& url, const QString &file_path);
|
||||
|
@ -54,8 +54,8 @@ public:
|
||||
virtual void setParent(RssFolder* parent) = 0;
|
||||
virtual void refresh() = 0;
|
||||
virtual void removeAllSettings() = 0;
|
||||
virtual QList<RssArticle> articleList() const = 0;
|
||||
virtual QList<RssArticle> unreadArticleList() const = 0;
|
||||
virtual const QList<RssArticle> articleList() const = 0;
|
||||
virtual const QList<RssArticle> unreadArticleList() const = 0;
|
||||
QStringList pathHierarchy() const;
|
||||
};
|
||||
|
||||
|
@ -90,7 +90,7 @@ void RssFolder::refresh() {
|
||||
}
|
||||
}
|
||||
|
||||
QList<RssArticle> RssFolder::articleList() const {
|
||||
const QList<RssArticle> RssFolder::articleList() const {
|
||||
QList<RssArticle> news;
|
||||
foreach(const IRssFile *child, m_children.values()) {
|
||||
news << child->articleList();
|
||||
@ -98,7 +98,7 @@ QList<RssArticle> RssFolder::articleList() const {
|
||||
return news;
|
||||
}
|
||||
|
||||
QList<RssArticle> RssFolder::unreadArticleList() const {
|
||||
const QList<RssArticle> RssFolder::unreadArticleList() const {
|
||||
QList<RssArticle> unread_news;
|
||||
foreach(const IRssFile *child, m_children.values()) {
|
||||
unread_news << child->unreadArticleList();
|
||||
|
@ -57,8 +57,8 @@ public:
|
||||
QString displayName() const;
|
||||
QString id() const;
|
||||
bool hasChild(const QString &childId);
|
||||
QList<RssArticle> articleList() const;
|
||||
QList<RssArticle> unreadArticleList() const;
|
||||
const QList<RssArticle> articleList() const;
|
||||
const QList<RssArticle> unreadArticleList() const;
|
||||
void removeAllSettings();
|
||||
void removeAllItems();
|
||||
void renameChildFolder(const QString &old_name, const QString &new_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user