From 77b3cd57f930ec70e6f618da70985e23e5cf76fc Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 19 Oct 2018 01:44:06 +0200 Subject: Integrate FilterTree into browser (#6) - change filter.path to filter.hosts to represent that the setting is only used for hostlist-format lists - change FilterTree::match to use QUrl and not QString --- src/webengine/filter.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/webengine/filter.h') diff --git a/src/webengine/filter.h b/src/webengine/filter.h index 3eac5ee..c610b29 100644 --- a/src/webengine/filter.h +++ b/src/webengine/filter.h @@ -13,6 +13,7 @@ #include #include #include +#include "urlfilter/filtertree.h" class Configuration; class Filter : public QObject @@ -26,11 +27,7 @@ public: explicit Filter(const std::unique_ptr &config, QObject *parent = nullptr); ~Filter() override = default; - const QHash hostlist() const - { - return qAsConst(m_hostlist); - } - std::optional hostlistRule(const QString &url) const; + void filterRequest(QWebEngineUrlRequestInfo &info) const; const QMap headers() const { @@ -38,7 +35,7 @@ public: } private: - QHash m_hostlist; + FilterTree filters; QMap m_headers; }; -- cgit v1.2.1