aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/urlinterceptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/urlinterceptor.h')
-rw-r--r--src/webengine/urlinterceptor.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/webengine/urlinterceptor.h b/src/webengine/urlinterceptor.h
index b34d9ff..af15f99 100644
--- a/src/webengine/urlinterceptor.h
+++ b/src/webengine/urlinterceptor.h
@@ -10,6 +10,7 @@
#define URLREQUESTINTERCEPTOR_H
#include <QWebEngineUrlRequestInterceptor>
+#include <QMutex>
class UrlRequestInterceptor : public QWebEngineUrlRequestInterceptor
{
@@ -20,15 +21,15 @@ public:
};
explicit UrlRequestInterceptor(const QString &path, QObject *parent = nullptr);
- ~UrlRequestInterceptor();
+ ~UrlRequestInterceptor() override;
- void interceptRequest(QWebEngineUrlRequestInfo &info);
-
-public slots:
- int parseHostfile(const QString &filename);
+ void interceptRequest(QWebEngineUrlRequestInfo &info) override;
private:
- QHash<QString, HostRule *> m_rules;
+ QHash<QString, HostRule> rules;
+ QMutex rulesLock;
};
+QHash<QString, UrlRequestInterceptor::HostRule> parse(const QString &filename);
+
#endif // URLREQUESTINTERCEPTOR_H