summaryrefslogtreecommitdiff
path: root/src/protocolhandler.cpp
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/protocolhandler.cpp
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/protocolhandler.cpp')
-rw-r--r--src/protocolhandler.cpp53
1 files changed, 0 insertions, 53 deletions
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<QString, QString> 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);
- }
-}