diff options
Diffstat (limited to 'staging/adblock/rule.h')
-rw-r--r-- | staging/adblock/rule.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/staging/adblock/rule.h b/staging/adblock/rule.h index 03970dc..90062ba 100644 --- a/staging/adblock/rule.h +++ b/staging/adblock/rule.h @@ -45,7 +45,8 @@ public: enum MatchPosition { UrlStartsWith, UrlEndsWith, - UrlContains + UrlContains, + UrlEquals }; MatcherRule(const QString &pattern, const Options &opt, const MatchPosition pos = UrlContains) @@ -58,6 +59,9 @@ public: explicit MatcherRule(const MatcherRule &) = delete; MatcherRule &operator=(const MatcherRule &) = delete; + explicit MatcherRule(MatcherRule &&) = delete; + MatcherRule &operator=(MatcherRule &&) = delete; + ~MatcherRule() = default; bool hasMatch(const QStringRef &url) const override { @@ -70,6 +74,8 @@ public: return (index == url.length() - patternLength); case UrlContains: return (index != -1); + case UrlEquals: + return (index == 0 && patternLength == url.length()); } } @@ -93,6 +99,9 @@ public: explicit RegexRule(const RegexRule &) = delete; RegexRule &operator=(const RegexRule &) = delete; + explicit RegexRule(RegexRule &&) = delete; + RegexRule &operator=(RegexRule &&) = delete; + ~RegexRule() = default; bool hasMatch(const QStringRef &url) const override { |