aboutsummaryrefslogtreecommitdiff
path: root/src/filter/filter.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-08-05 15:05:22 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-08-05 15:05:22 +0200
commit9089047b0f5fac8a394ef0b4c8822ce5c7483212 (patch)
tree9b5307ee66c08492ae4d79d150e6b4ac71fb677d /src/filter/filter.cpp
parentMerge branch 'master' of ssh://bitbucket.org/xiannox/smolbote (diff)
downloadsmolbote-9089047b0f5fac8a394ef0b4c8822ce5c7483212.tar.xz
Changed the filter format
Diffstat (limited to 'src/filter/filter.cpp')
-rw-r--r--src/filter/filter.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/filter/filter.cpp b/src/filter/filter.cpp
index e0d01a9..fcba05c 100644
--- a/src/filter/filter.cpp
+++ b/src/filter/filter.cpp
@@ -96,13 +96,14 @@ int Filter::row() const
return 0;
}
-bool Filter::hasMatch(const QWebEngineUrlRequestInfo &info)
+bool Filter::hasDomainMatch(const QString &string)
{
- if(m_domainUrl.hasMatch(info.firstPartyUrl().toString()) && m_requestUrl.hasMatch(info.requestUrl().toString())) {
- return true;
- } else {
- return false;
- }
+ return m_domainUrl.hasMatch(string);
+}
+
+bool Filter::hasRuleMatch(const QString &string)
+{
+ return m_requestUrl.hasMatch(string);
}
bool Filter::shouldBlock(const QWebEngineUrlRequestInfo &info)