aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/blockerrule.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/blockerrule.h')
-rw-r--r--src/webengine/blockerrule.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/webengine/blockerrule.h b/src/webengine/blockerrule.h
index 810de6d..bdb2eb9 100644
--- a/src/webengine/blockerrule.h
+++ b/src/webengine/blockerrule.h
@@ -23,7 +23,7 @@
#include <QObject>
#include <QUrl>
-#include <QRegularExpression>
+#include "regexp.h"
#include <QWebEngineUrlRequestInfo>
class BlockerRule : public QObject
@@ -32,9 +32,7 @@ class BlockerRule : public QObject
public:
enum RuleType {
Invalid,
- DomainMatch,
- RegularExpressionMatch,
- WildcardMatch
+ RegularExpressionMatch
};
enum RuleOption {
@@ -70,16 +68,14 @@ signals:
public slots:
private:
- // TODO: subclass QRegularExpression and move this there
- QString fromWildcardMatch(const QString &pattern);
bool matchOptions(const QWebEngineUrlRequestInfo &info, const RuleOptions &options);
- QString m_rule;
-
RuleType m_type;
bool m_exception = false;
- QString m_domain;
- QRegularExpression ruleExpression;
+ QStringList hostsBlacklist;
+ QStringList hostsWhitelist;
+ RegExp domainExpression;
+ RegExp ruleExpression;
RuleOptions m_blacklistOptions;
RuleOptions m_whitelistOptions;