diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-12-23 16:45:31 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-12-23 16:45:31 +0100 |
commit | f7ed63179fa4f99322d6c7716e17466ec4e3e4ce (patch) | |
tree | f187d1f73300f1ac0882a4be569d567bb4ed29f7 /lib/adblock/filterrule.h | |
parent | Removed SingleApplication::SessionParam (diff) | |
download | smolbote-f7ed63179fa4f99322d6c7716e17466ec4e3e4ce.tar.xz |
Request filter now properly takes hostlists
- hostslist directory is set in browser.filterPath
Diffstat (limited to 'lib/adblock/filterrule.h')
-rw-r--r-- | lib/adblock/filterrule.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/adblock/filterrule.h b/lib/adblock/filterrule.h deleted file mode 100644 index 084bd8c..0000000 --- a/lib/adblock/filterrule.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of smolbote. It's copyrighted by the contributors recorded - * in the version control history of the file, available from its original - * location: git://neueland.iserlohn-fortress.net/smolbote.git - * - * SPDX-License-Identifier: GPL-3.0 - */ - -#ifndef FILTERRULE_H -#define FILTERRULE_H - -#include <QRegularExpression> - -class QUrl; -class FilterRule -{ -public: - - FilterRule(const QString &line); - - // delete the copy constructor and assignment operator - FilterRule(const FilterRule&) = delete; - FilterRule& operator=(const FilterRule&) = delete; - - // move constructor - FilterRule(FilterRule&& other) { - valid = other.valid; - exception = other.exception; - rule = other.rule; - } - - ~FilterRule(); - - bool isValid() const; - bool isException() const; - bool shouldBlock(const QUrl &requestUrl) const; - -private: - bool parse(const QString &line); - - bool valid; - bool exception; - - QRegularExpression rule; - -}; - -QString createRegExpPattern(const QString &line); - -#endif // FILTERRULE_H |