diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-07-29 11:04:20 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-08-04 09:42:01 +0000 |
commit | 2a56ec7ce4713711b55bb1dfc86a4320d943f606 (patch) | |
tree | aa7edd2223e443384e157aaa367795aaec4e8a37 /src/webenginewidgets/api/qwebengineprofile.cpp | |
parent | e11cd75ff506e8dcbfc990d70baeec821f1f0563 (diff) |
add API to set the Accept-Language HTTP request-header field
Add methods to set the Accept-Language field in QWebEngineProfile and
QQuickWebEngineProfile.
Task-number: QTBUG-47412
Change-Id: Ifa376bb3551fdc1fb3d68279d734b7f7735782fc
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/webenginewidgets/api/qwebengineprofile.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index b73355ac2..29010b0dd 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -355,6 +355,28 @@ void QWebEngineProfile::setHttpCacheType(QWebEngineProfile::HttpCacheType httpCa } /*! + Sets the value of the Accept-Language HTTP request-header field. + + \since 5.6 + */ +void QWebEngineProfile::setHttpAcceptLanguage(const QString &httpAcceptLanguage) +{ + Q_D(QWebEngineProfile); + d->browserContext()->setHttpAcceptLanguage(httpAcceptLanguage); +} + +/*! + Returns the value of the Accept-Language HTTP request-header field. + + \since 5.6 + */ +QString QWebEngineProfile::httpAcceptLanguage() const +{ + Q_D(const QWebEngineProfile); + return d->browserContext()->httpAcceptLanguage(); +} + +/*! Returns the current policy for persistent cookies. If the profile is off-the-record NoPersistentCookies is returned. |