diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-11-16 16:26:22 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-11-16 16:26:22 +0100 |
commit | 566abfa99120652fb1e9190d791fdbbba64d2e0d (patch) | |
tree | 86a6f71b926794298d922a9319b55909cf5a07b4 /lib/urlfilter/filterleaf.cpp | |
parent | Add more regex benchmarks (diff) | |
download | smolbote-566abfa99120652fb1e9190d791fdbbba64d2e0d.tar.xz |
Add adblockrule_parse
Diffstat (limited to 'lib/urlfilter/filterleaf.cpp')
-rw-r--r-- | lib/urlfilter/filterleaf.cpp | 22 |
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; } |