aboutsummaryrefslogtreecommitdiff
path: root/staging/adblock/filterlist.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-04-15 11:56:04 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2020-04-21 20:14:56 +0300
commit761446e34af7a81d0516e322228616ebd046c9ba (patch)
tree6a232c099e061960be812a579b174d3ca5d50ea3 /staging/adblock/filterlist.cpp
parentAdd some FilterList tests (diff)
downloadsmolbote-761446e34af7a81d0516e322228616ebd046c9ba.tar.xz
Fix MatcherRule with DomainMatch
Diffstat (limited to 'staging/adblock/filterlist.cpp')
-rw-r--r--staging/adblock/filterlist.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/staging/adblock/filterlist.cpp b/staging/adblock/filterlist.cpp
index 2677e1c..d3f6134 100644
--- a/staging/adblock/filterlist.cpp
+++ b/staging/adblock/filterlist.cpp
@@ -88,7 +88,7 @@ Rule *FilterList::parseRule(const QByteArray &line)
if(pattern.startsWith("||") && pattern.endsWith("^")) {
// domain match
pattern = pattern.mid(2, pattern.length() - 3);
- return new MatcherRule(pattern, opt);
+ return new MatcherRule(pattern, opt, MatcherRule::DomainMatch);
} else if(pattern.startsWith("|") && pattern.endsWith("|")) {
// string equals
@@ -110,7 +110,7 @@ Rule *FilterList::parseRule(const QByteArray &line)
pattern = pattern.mid(1, pattern.length() - 2);
return new RegexRule(pattern, opt);
- } else if(!pattern.isEmpty()){
+ } else if(!pattern.isEmpty()) {
// wildcard pattern
pattern = QRegularExpression::wildcardToRegularExpression(pattern);
return new RegexRule(pattern, opt);