summaryrefslogtreecommitdiff
path: root/src/adblock
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-02-12 10:59:30 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-03-13 10:24:41 +0100
commit3edb02d6d4f61e16c569bfe934777519bd86c5b8 (patch)
tree38c2cda1c7472611a28401877fe6f02ef84df08f /src/adblock
parentGet sure urlbar(s) are deleted when related webtab is (diff)
downloadrekonq-3edb02d6d4f61e16c569bfe934777519bd86c5b8.tar.xz
Remove ability to manage abp schemes and add subscriptions on click
Diffstat (limited to 'src/adblock')
-rw-r--r--src/adblock/adblockmanager.cpp22
-rw-r--r--src/adblock/adblockmanager.h3
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: