From f7ed63179fa4f99322d6c7716e17466ec4e3e4ce Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 23 Dec 2017 16:45:31 +0100 Subject: Request filter now properly takes hostlists - hostslist directory is set in browser.filterPath --- src/webengine/urlinterceptor.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/webengine/urlinterceptor.h') diff --git a/src/webengine/urlinterceptor.h b/src/webengine/urlinterceptor.h index cf1597c..1ff786b 100644 --- a/src/webengine/urlinterceptor.h +++ b/src/webengine/urlinterceptor.h @@ -11,26 +11,22 @@ #include #include -#include "filter/filter.h" +#include "hostrule.h" class UrlRequestInterceptor : public QWebEngineUrlRequestInterceptor { Q_OBJECT public: explicit UrlRequestInterceptor(const QString &path, QObject *parent = nullptr); - //~UrlRequestInterceptor(); + ~UrlRequestInterceptor(); void interceptRequest(QWebEngineUrlRequestInfo &info); -signals: - public slots: + int parseHostfile(const QString &filename); private: - - std::vector m_rules; + std::vector m_rules; }; -bool shouldBlock(const QUrl &url, const QString &test); - #endif // URLREQUESTINTERCEPTOR_H -- cgit v1.2.1