diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-10-19 01:44:06 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-10-19 01:44:06 +0200 |
commit | 77b3cd57f930ec70e6f618da70985e23e5cf76fc (patch) | |
tree | 712dbb43ec463a8524286d9e6e0fb2d2f8b9d6ab /lib/urlfilter/filtertree.cpp | |
parent | urlfilter: destroy FilterLeaves only when destroying the FilterTree (diff) | |
download | smolbote-77b3cd57f930ec70e6f618da70985e23e5cf76fc.tar.xz |
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
Diffstat (limited to 'lib/urlfilter/filtertree.cpp')
-rw-r--r-- | lib/urlfilter/filtertree.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<const FilterLeaf *> FilterTree::match(const QString &domain, const QString &requestUrl) const +QVector<const FilterLeaf *> FilterTree::match(const QUrl &domain, const QUrl &requestUrl) const { QVector<const FilterLeaf *> 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)) { |