Browse Source

RSS: Correctly mark virtual functions

adaptive-webui-19844
Christophe Dumez 13 years ago
parent
commit
9acac03f14
  1. 4
      src/rss/rssfeed.cpp
  2. 20
      src/rss/rssfeed.h
  3. 4
      src/rss/rssfile.h
  4. 4
      src/rss/rssfolder.cpp
  5. 22
      src/rss/rssfolder.h

4
src/rss/rssfeed.cpp

@ -198,11 +198,11 @@ uint RssFeed::unreadCount() const{ @@ -198,11 +198,11 @@ uint RssFeed::unreadCount() const{
return nbUnread;
}
const RssArticleList RssFeed::articleList() const{
RssArticleList RssFeed::articleList() const{
return m_articles.values();
}
const RssArticleList RssFeed::unreadArticleList() const {
RssArticleList RssFeed::unreadArticleList() const {
RssArticleList unread_news;
for (RssArticleHash::ConstIterator it = m_articles.begin(); it != m_articles.end(); it++) {
if(!it.value()->isRead())

20
src/rss/rssfeed.h

@ -49,29 +49,29 @@ class RssFeed: public QObject, public RssFile { @@ -49,29 +49,29 @@ class RssFeed: public QObject, public RssFile {
public:
RssFeed(RssManager* manager, RssFolder* m_parent, const QString &url);
virtual ~RssFeed();
inline RssFolder* parent() const { return m_parent; }
void setParent(RssFolder* parent) { m_parent = parent; }
virtual RssFolder* parent() const { return m_parent; }
virtual void setParent(RssFolder* parent) { m_parent = parent; }
void refresh();
QString id() const { return m_url; }
void removeAllSettings();
virtual QString id() const { return m_url; }
virtual void removeAllSettings();
bool itemAlreadyExists(const QString &guid) const;
virtual void saveItemsToDisk();
void setLoading(bool val);
bool isLoading() const;
QString title() const;
void rename(const QString &alias);
QString displayName() const;
virtual void rename(const QString &alias);
virtual QString displayName() const;
QString url() const;
QString icon() const;
bool hasCustomIcon() const;
void setIconPath(const QString &pathHierarchy);
RssArticlePtr getItem(const QString &guid) const;
uint count() const;
void markAsRead();
uint unreadCount() const;
const RssArticleList articleList() const;
virtual void markAsRead();
virtual uint unreadCount() const;
virtual RssArticleList articleList() const;
const RssArticleHash& articleHash() const { return m_articles; }
const RssArticleList unreadArticleList() const;
virtual RssArticleList unreadArticleList() const;
private slots:
void handleFinishedDownload(const QString& url, const QString &file_path);

4
src/rss/rssfile.h

@ -59,9 +59,9 @@ public: @@ -59,9 +59,9 @@ public:
virtual RssFolder* parent() const = 0;
virtual void setParent(RssFolder* parent) = 0;
virtual void refresh() = 0;
virtual RssArticleList articleList() const = 0;
virtual RssArticleList unreadArticleList() const = 0;
virtual void removeAllSettings() = 0;
virtual const RssArticleList articleList() const = 0;
virtual const RssArticleList unreadArticleList() const = 0;
virtual void saveItemsToDisk() = 0;
QStringList pathHierarchy() const;
};

4
src/rss/rssfolder.cpp

@ -83,7 +83,7 @@ void RssFolder::refresh() { @@ -83,7 +83,7 @@ void RssFolder::refresh() {
}
}
const RssArticleList RssFolder::articleList() const {
RssArticleList RssFolder::articleList() const {
RssArticleList news;
for (RssFileHash::ConstIterator it = m_children.begin(); it != m_children.end(); it++) {
news << it.value()->articleList();
@ -91,7 +91,7 @@ const RssArticleList RssFolder::articleList() const { @@ -91,7 +91,7 @@ const RssArticleList RssFolder::articleList() const {
return news;
}
const RssArticleList RssFolder::unreadArticleList() const {
RssArticleList RssFolder::unreadArticleList() const {
RssArticleList unread_news;
for (RssFileHash::ConstIterator it = m_children.begin(); it != m_children.end(); it++) {
unread_news << it.value()->unreadArticleList();

22
src/rss/rssfolder.h

@ -50,32 +50,32 @@ class RssFolder: public QObject, public RssFile { @@ -50,32 +50,32 @@ class RssFolder: public QObject, public RssFile {
public:
RssFolder(RssFolder *parent = 0, const QString &name = QString());
virtual ~RssFolder();
inline RssFolder* parent() const { return m_parent; }
void setParent(RssFolder* parent) { m_parent = parent; }
unsigned int unreadCount() const;
virtual RssFolder* parent() const { return m_parent; }
virtual void setParent(RssFolder* parent) { m_parent = parent; }
virtual unsigned int unreadCount() const;
RssFeedPtr addStream(RssManager* manager, const QString &url);
RssFolderPtr addFolder(const QString &name);
unsigned int getNbFeeds() const;
RssFileList getContent() const;
RssFeedList getAllFeeds() const;
QHash<QString, RssFeedPtr> getAllFeedsAsHash() const;
QString displayName() const;
QString id() const;
virtual QString displayName() const;
virtual QString id() const;
bool hasChild(const QString &childId);
const RssArticleList articleList() const;
const RssArticleList unreadArticleList() const;
void removeAllSettings();
virtual RssArticleList articleList() const;
virtual RssArticleList unreadArticleList() const;
virtual void removeAllSettings();
virtual void saveItemsToDisk();
void removeAllItems();
void renameChildFolder(const QString &old_name, const QString &new_name);
RssFilePtr takeChild(const QString &childId);
public slots:
void refresh();
virtual void refresh();
void addFile(const RssFilePtr& item);
void removeChild(const QString &childId);
void rename(const QString &new_name);
void markAsRead();
virtual void rename(const QString &new_name);
virtual void markAsRead();
private:
RssFolder *m_parent;

Loading…
Cancel
Save