aboutsummaryrefslogtreecommitdiff
path: root/lib/web/webprofile.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-07 13:20:54 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-07 18:19:19 +0200
commit2a5ea0269a1f9511c51d661a6c7d7bdc7d0176fa (patch)
tree7649cf4c1c20bbe8c801d642148992eea314d3ec /lib/web/webprofile.h
parentAdd hint on enabling plugins to makepkg (diff)
downloadsmolbote-2a5ea0269a1f9511c51d661a6c7d7bdc7d0176fa.tar.xz
Expand HTTP header settings #4
- add doc/Usage/Filter.asciidoc to explain the usage of the filter headers - add HTTP headers to Profile (section "headers") - Use request interceptor to apply filter headers, then profile headers - add insert/delete actions to ProfileEditor
Diffstat (limited to 'lib/web/webprofile.h')
-rw-r--r--lib/web/webprofile.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/web/webprofile.h b/lib/web/webprofile.h
index b58fad7..269989b 100644
--- a/lib/web/webprofile.h
+++ b/lib/web/webprofile.h
@@ -65,6 +65,10 @@ public:
{
return qAsConst(m_cookies);
}
+ const QMap<QByteArray, QByteArray> headers() const
+ {
+ return qAsConst(m_headers);
+ }
// search url
QString search() const;
@@ -86,6 +90,8 @@ public:
void setHttpCacheMaximumSize(int maxSize);
void setHttpCacheType(int type);
void setHttpUserAgent(const QString &userAgent);
+ void setHttpHeader(const QString &name, const QString &value);
+ void removeHttpHeader(const QString &name);
void setSpellCheckEnabled(bool enable);
@@ -97,6 +103,8 @@ signals:
void propertyChanged(const QString &name, const QVariant &value);
void attributeChanged(const QWebEngineSettings::WebAttribute attribute, const bool value);
+ void headerChanged(const QString &name, const QString &value);
+ void headerRemoved(const QString &name);
private:
static WebProfile *profile;
@@ -107,6 +115,7 @@ private:
QUrl m_newtab = QUrl("about:blank");
QVector<QNetworkCookie> m_cookies;
+ QMap<QByteArray, QByteArray> m_headers;
};
#endif // SMOLBOTE_WEBENGINEPROFILE_H