aboutsummaryrefslogtreecommitdiff
path: root/lib/urlfilter/filterleaf.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-11-16 16:26:22 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2018-11-16 16:26:22 +0100
commit566abfa99120652fb1e9190d791fdbbba64d2e0d (patch)
tree86a6f71b926794298d922a9319b55909cf5a07b4 /lib/urlfilter/filterleaf.cpp
parentAdd more regex benchmarks (diff)
downloadsmolbote-566abfa99120652fb1e9190d791fdbbba64d2e0d.tar.xz
Add adblockrule_parse
Diffstat (limited to 'lib/urlfilter/filterleaf.cpp')
-rw-r--r--lib/urlfilter/filterleaf.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/lib/urlfilter/filterleaf.cpp b/lib/urlfilter/filterleaf.cpp
index 87cd91d..5797718 100644
--- a/lib/urlfilter/filterleaf.cpp
+++ b/lib/urlfilter/filterleaf.cpp
@@ -1,26 +1,14 @@
#include "filterleaf.h"
-FilterLeaf::FilterLeaf(FilterLeaf &&other)
-{
- m_isBlocking = other.m_isBlocking;
- m_request = std::move(other.m_request);
- m_redirect = std::move(other.m_redirect);
-}
-
-FilterLeaf &FilterLeaf::operator=(FilterLeaf &&other)
-{
- m_isBlocking = other.m_isBlocking;
- m_request = std::move(other.m_request);
- m_redirect = std::move(other.m_redirect);
- return *this;
-}
-
const QString FilterLeaf::request() const
{
return m_request;
}
-const QString FilterLeaf::redirect() const
+std::optional<bool> FilterLeaf::option(QWebEngineUrlRequestInfo::ResourceType opt) const
{
- return m_redirect;
+ if(resourceTypeOptions.contains(opt))
+ return resourceTypeOptions.value(opt);
+ else
+ return std::nullopt;
}