aboutsummaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web')
-rw-r--r--lib/web/webprofile.cpp13
-rw-r--r--lib/web/webprofile.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/web/webprofile.cpp b/lib/web/webprofile.cpp
index 4d31376..295f639 100644
--- a/lib/web/webprofile.cpp
+++ b/lib/web/webprofile.cpp
@@ -104,6 +104,12 @@ void WebProfile::setPersistentStoragePath(const QString &path)
emit propertyChanged("persistentStoragePath", path);
}
+void WebProfile::setPersistentCookiesPolicy(int policy)
+{
+ QWebEngineProfile::setPersistentCookiesPolicy(static_cast<QWebEngineProfile::PersistentCookiesPolicy>(policy));
+ emit propertyChanged("persistentCookiesPolicy", policy);
+}
+
void WebProfile::setHttpAcceptLanguage(const QString &httpAcceptLanguage)
{
QWebEngineProfile::setHttpAcceptLanguage(httpAcceptLanguage);
@@ -116,6 +122,13 @@ void WebProfile::setHttpCacheMaximumSize(int maxSize)
emit propertyChanged("httpCacheMaximumSize", maxSize);
}
+void WebProfile::setHttpCacheType(int type)
+{
+ qDebug("set httpCacheType to %i", type);
+ QWebEngineProfile::setHttpCacheType(static_cast<QWebEngineProfile::HttpCacheType>(type));
+ emit propertyChanged("httpCacheType", type);
+}
+
void WebProfile::setHttpUserAgent(const QString &userAgent)
{
QWebEngineProfile::setHttpUserAgent(userAgent);
diff --git a/lib/web/webprofile.h b/lib/web/webprofile.h
index 2282afe..32b5112 100644
--- a/lib/web/webprofile.h
+++ b/lib/web/webprofile.h
@@ -30,9 +30,11 @@ class WebProfile : public QWebEngineProfile
// QWebEngineProfile should-be properties
Q_PROPERTY(QString cachePath READ cachePath WRITE setCachePath NOTIFY propertyChanged)
Q_PROPERTY(QString persistentStoragePath READ persistentStoragePath WRITE setPersistentStoragePath NOTIFY propertyChanged)
+ Q_PROPERTY(int persistentCookiesPolicy READ persistentCookiesPolicy WRITE setPersistentCookiesPolicy NOTIFY propertyChanged)
Q_PROPERTY(QString httpAcceptLanguage READ httpAcceptLanguage WRITE setHttpAcceptLanguage NOTIFY propertyChanged)
Q_PROPERTY(int httpCacheMaximumSize READ httpCacheMaximumSize WRITE setHttpCacheMaximumSize NOTIFY propertyChanged)
+ Q_PROPERTY(int httpCacheType READ httpCacheType WRITE setHttpCacheType NOTIFY propertyChanged)
Q_PROPERTY(QString httpUserAgent READ httpUserAgent WRITE setHttpUserAgent NOTIFY propertyChanged)
Q_PROPERTY(bool spellCheckEnabled READ isSpellCheckEnabled WRITE setSpellCheckEnabled NOTIFY propertyChanged)
@@ -78,9 +80,11 @@ public:
void setCachePath(const QString &path);
void setPersistentStoragePath(const QString &path);
+ void setPersistentCookiesPolicy(int policy);
void setHttpAcceptLanguage(const QString &httpAcceptLanguage);
void setHttpCacheMaximumSize(int maxSize);
+ void setHttpCacheType(int type);
void setHttpUserAgent(const QString &userAgent);
void setSpellCheckEnabled(bool enable);