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/protocolhandler.cpp | 53 ------------------------------------------------- 1 file changed, 53 deletions(-) (limited to 'src/protocolhandler.cpp') diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index bade99cb..4744e766 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -31,7 +31,6 @@ #include "rekonq.h" // Local Includes -#include "adblockmanager.h" #include "application.h" #include "historymanager.h" #include "mainview.h" @@ -124,13 +123,6 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra return true; } - // "abp" handling - if (_url.protocol() == QL1S("abp")) - { - abpHandling(); - return true; - } - // "about" handling if (_url.protocol() == QL1S("about")) { @@ -358,48 +350,3 @@ void ProtocolHandler::slotMostLocalUrlResult(KJob *job) } } } - - -/** - * abp scheme (easy) explanation - * - */ -void ProtocolHandler::abpHandling() -{ - QString path = _url.path(); - if (path != QL1S("subscribe")) - return; - - QMap map = _url.queryItems(KUrl::CaseInsensitiveKeys); - - QString location = map.value(QL1S("location")); - QString title = map.value(QL1S("title")); - QString requireslocation = map.value(QL1S("requireslocation")); - QString requirestitle = map.value(QL1S("requirestitle")); - - QString info; - if (requirestitle.isEmpty() || requireslocation.isEmpty()) - { - info = title; - } - else - { - info = i18n("\n %1,\n %2 (required by %3)\n", title, requirestitle, title); - } - - if (KMessageBox::questionYesNo(0, - i18n("Do you want to add the following subscriptions to your adblock settings?\n") + info, - i18n("Add automatic subscription to the adblock"), - KGuiItem(i18n("Add")), - KGuiItem(i18n("Discard")) - ) - ) - { - if (!requireslocation.isEmpty() && !requirestitle.isEmpty()) - { - rApp->adblockManager()->addSubscription(requirestitle, requireslocation); - } - rApp->adblockManager()->addSubscription(title, location); - rApp->adblockManager()->loadSettings(false); - } -} -- cgit v1.2.1