From 3edb02d6d4f61e16c569bfe934777519bd86c5b8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 12 Feb 2012 10:59:30 +0100 Subject: Remove ability to manage abp schemes and add subscriptions on click --- src/adblock/adblockmanager.cpp | 22 ++-------------------- src/adblock/adblockmanager.h | 3 +-- 2 files changed, 3 insertions(+), 22 deletions(-) (limited to 'src/adblock') 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 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: -- cgit v1.2.1