diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-28 10:18:08 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-02-28 10:18:08 +0100 |
commit | 7f6c9b22d1016aa0dba709495fabf41397676039 (patch) | |
tree | 35898077b84be953c0645262aaa9470802b5267b /src/webengine/urlinterceptor.cpp | |
parent | Fixed crash when closing the first tab (diff) | |
download | smolbote-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.cpp | 23 |
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; } |