#include "urlinterceptor.h" AdBlockInterceptor::AdBlockInterceptor(QObject *parent) : QWebEngineUrlRequestInterceptor(parent) { } void AdBlockInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) { // bool blocked = false; // for(AdBlockRule *rule : m_urlBlacklist) { // if(rule->match(info.requestUrl())) { // info.block(true); // blocked = true; // } // } qDebug("%i %i %s %s", info.navigationType(), info.resourceType(), qUtf8Printable(info.requestMethod()), qUtf8Printable(info.requestUrl().toString())); }