From 761446e34af7a81d0516e322228616ebd046c9ba Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 15 Apr 2020 11:56:04 +0300 Subject: Fix MatcherRule with DomainMatch --- staging/adblock/filterlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'staging/adblock/filterlist.cpp') 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); -- cgit v1.2.1