diff options
Diffstat (limited to 'src/webengine/urlinterceptor.cpp')
-rw-r--r-- | src/webengine/urlinterceptor.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/webengine/urlinterceptor.cpp b/src/webengine/urlinterceptor.cpp index da2925c..3ffcb44 100644 --- a/src/webengine/urlinterceptor.cpp +++ b/src/webengine/urlinterceptor.cpp @@ -19,7 +19,11 @@ ******************************************************************************/ #include "urlinterceptor.h" -#include "blocker/filtercollection.h" +#include "filter/filtercollection.h" + +#ifdef DEBUG_VERBOSE +#include <QTime> +#endif UrlRequestInterceptor::UrlRequestInterceptor(QObject *parent) : QWebEngineUrlRequestInterceptor(parent) @@ -29,7 +33,9 @@ UrlRequestInterceptor::UrlRequestInterceptor(QObject *parent) : void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) { #ifdef DEBUG_VERBOSE + QTime time; qDebug("%s --> [%i] %s", qUtf8Printable(info.firstPartyUrl().toString()), info.resourceType(), qUtf8Printable(info.requestUrl().toString())); + time.start(); #endif for(auto s : m_manager->subscriptions()) { @@ -37,11 +43,15 @@ void UrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) if(r.match) { info.block(r.block); #ifdef DEBUG_VERBOSE - qDebug(">> matched [%s] [%s]", r.block ? "blocked" : "allowed", qUtf8Printable(r.pattern)); + qDebug(">> matched [%s] [%s] in %i ms", r.block ? "blocked" : "allowed", qUtf8Printable(r.pattern), time.elapsed()); #endif return; } } + +#ifdef DEBUG_VERBOSE + qDebug(">> passed in %i ms", time.elapsed()); +#endif } void UrlRequestInterceptor::setSubscription(BlockerManager *manager) |