aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/urlinterceptor.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-02-28 10:18:08 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-02-28 10:18:08 +0100
commit7f6c9b22d1016aa0dba709495fabf41397676039 (patch)
tree35898077b84be953c0645262aaa9470802b5267b /src/webengine/urlinterceptor.cpp
parentFixed crash when closing the first tab (diff)
downloadsmolbote-7f6c9b22d1016aa0dba709495fabf41397676039.tar.xz
Blocker rewrites
Some code commenting Moved Blocker files for src/blocker Keyboard shortcut for Blocker dialog
Diffstat (limited to 'src/webengine/urlinterceptor.cpp')
-rw-r--r--src/webengine/urlinterceptor.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp
index 9352af6..3c6a56e 100644
--- a/src/webengine/urlinterceptor.cpp
+++ b/src/webengine/urlinterceptor.cpp
@@ -27,27 +27,10 @@ UrlRequestInterceptor::UrlRequestInterceptor(QObject *parent) :
void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
- for(BlockerRule *rule : m_sub->urlWhitelist()) {
- if(rule->match(info)) {
- qDebug("OK %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString()));
- return;
- }
- }
-
- for(BlockerRule *rule : m_sub->urlBlacklist()) {
- if(rule->match(info)) {
- info.block(true);
- qDebug(" %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString()));
- return;
- }
- }
-
- // rule is neither in whitelist nor blacklist
- qDebug("OK %i %s", info.resourceType(), qUtf8Printable(info.requestUrl().toString()));
-
+ //
}
-void UrlRequestInterceptor::setSubscription(BlockerSubscription *subscription)
+void UrlRequestInterceptor::setSubscription(BlockerManager *subscription)
{
- m_sub = subscription;
+ m_blocker = subscription;
}