aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/adblockrule.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-01-23 15:42:14 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-01-23 15:42:14 +0100
commitd886b377ac168d32668b5f3d145279a4f64de730 (patch)
treeb5547077ce555e8c609495fc6b3851b827abbb3d /src/webengine/adblockrule.h
parentRemoved window/title config (diff)
downloadsmolbote-d886b377ac168d32668b5f3d145279a4f64de730.tar.xz
URL blocking
Diffstat (limited to 'src/webengine/adblockrule.h')
-rw-r--r--src/webengine/adblockrule.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/webengine/adblockrule.h b/src/webengine/adblockrule.h
new file mode 100644
index 0000000..8c68de7
--- /dev/null
+++ b/src/webengine/adblockrule.h
@@ -0,0 +1,24 @@
+#ifndef ADBLOCKRULE_H
+#define ADBLOCKRULE_H
+
+#include <QObject>
+#include <QUrl>
+#include <QRegularExpression>
+
+class AdBlockRule : public QObject
+{
+ Q_OBJECT
+public:
+ explicit AdBlockRule(QString rule, QObject *parent = 0);
+
+ bool match(const QUrl &url);
+
+signals:
+
+public slots:
+
+private:
+ QRegularExpression ruleExpression;
+};
+
+#endif // ADBLOCKRULE_H