Add some global auto-update stuff.

This commit is contained in:
martinrotter 2017-03-14 14:20:17 +01:00
parent a4e2240e05
commit b8f90c8365
3 changed files with 17 additions and 0 deletions

View file

@ -118,6 +118,18 @@ void FeedReader::updateAutoUpdateStatus() {
} }
} }
bool FeedReader::autoUpdateEnabled() const {
return m_globalAutoUpdateEnabled;
}
int FeedReader::autoUpdateRemainingInterval() const {
return m_globalAutoUpdateRemainingInterval;
}
int FeedReader::autoUpdateInitialInterval() const {
return m_globalAutoUpdateInitialInterval;
}
void FeedReader::updateAllFeeds() { void FeedReader::updateAllFeeds() {
updateFeeds(m_feedsModel->rootItem()->getSubTreeFeeds()); updateFeeds(m_feedsModel->rootItem()->getSubTreeFeeds());
} }

View file

@ -61,6 +61,10 @@ class FeedReader : public QObject {
// and starts/stop the timer as needed. // and starts/stop the timer as needed.
void updateAutoUpdateStatus(); void updateAutoUpdateStatus();
bool autoUpdateEnabled() const;
int autoUpdateRemainingInterval() const;
int autoUpdateInitialInterval() const;
public slots: public slots:
// Schedules all feeds from all accounts for update. // Schedules all feeds from all accounts for update.
void updateAllFeeds(); void updateAllFeeds();

View file

@ -21,6 +21,7 @@
#include "miscellaneous/application.h" #include "miscellaneous/application.h"
#include "miscellaneous/mutex.h" #include "miscellaneous/mutex.h"
#include "miscellaneous/databasequeries.h" #include "miscellaneous/databasequeries.h"
#include "miscellaneous/feedreader.h"
#include "services/abstract/recyclebin.h" #include "services/abstract/recyclebin.h"
#include "services/abstract/serviceroot.h" #include "services/abstract/serviceroot.h"