diff options
Diffstat (limited to 'src/adblock')
-rw-r--r-- | src/adblock/adblockmanager.cpp | 22 | ||||
-rw-r--r-- | src/adblock/adblockmanager.h | 3 |
2 files changed, 3 insertions, 22 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp index 5078f215..e48cc753 100644 --- a/src/adblock/adblockmanager.cpp +++ b/src/adblock/adblockmanager.cpp @@ -64,7 +64,7 @@ AdBlockManager::~AdBlockManager() } -void AdBlockManager::loadSettings(bool checkUpdateDate) +void AdBlockManager::loadSettings() { _index = 0; _buffer.clear(); @@ -98,7 +98,7 @@ void AdBlockManager::loadSettings(bool checkUpdateDate) QDateTime lastUpdate = ReKonfig::lastUpdate(); // the day of the implementation.. :) int days = ReKonfig::updateInterval(); - if (!checkUpdateDate || today > lastUpdate.addDays(days)) + if (today > lastUpdate.addDays(days)) { ReKonfig::setLastUpdate(today); @@ -346,24 +346,6 @@ void AdBlockManager::saveRules(const QStringList &rules) } -void AdBlockManager::addSubscription(const QString &title, const QString &location) -{ - QStringList titles = ReKonfig::subscriptionTitles(); - if (titles.contains(title)) - return; - - QStringList locations = ReKonfig::subscriptionLocations(); - if (locations.contains(location)) - return; - - titles << title; - locations << location; - - ReKonfig::setSubscriptionTitles(titles); - ReKonfig::setSubscriptionLocations(locations); -} - - void AdBlockManager::showSettings() { QPointer<KDialog> dialog = new KDialog(); diff --git a/src/adblock/adblockmanager.h b/src/adblock/adblockmanager.h index 9d746e18..cce00877 100644 --- a/src/adblock/adblockmanager.h +++ b/src/adblock/adblockmanager.h @@ -155,10 +155,9 @@ public: QNetworkReply *block(const QNetworkRequest &request, WebPage *page); void applyHidingRules(WebPage *page); - void addSubscription(const QString &title, const QString &location); public Q_SLOTS: - void loadSettings(bool checkUpdateDate = true); + void loadSettings(); void showSettings(); private: |