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 --- lib/urlfilter/filtertree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/urlfilter/filtertree.cpp') diff --git a/lib/urlfilter/filtertree.cpp b/lib/urlfilter/filtertree.cpp index dcde196..2cdd6d0 100644 --- a/lib/urlfilter/filtertree.cpp +++ b/lib/urlfilter/filtertree.cpp @@ -57,11 +57,11 @@ const QStringList FilterTree::branches() const return branches; } -QVector FilterTree::match(const QString &domain, const QString &requestUrl) const +QVector FilterTree::match(const QUrl &domain, const QUrl &requestUrl) const { QVector leaves; for(const auto &branch : m_branches) { - if(branch.domain.matches(QUrl(domain))) { + if(branch.domain.matches(domain)) { for(const auto leaf : branch.leaves) { if(leaf->match(requestUrl)) { -- cgit v1.2.1