summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/api/qwebengineurlrequestjob.cpp2
-rw-r--r--src/core/api/qwebengineurlrequestjob.h2
-rw-r--r--src/core/net/url_request_custom_job_delegate.cpp2
-rw-r--r--src/core/net/url_request_custom_job_delegate.h2
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp22
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.h5
6 files changed, 13 insertions, 22 deletions
diff --git a/src/core/api/qwebengineurlrequestjob.cpp b/src/core/api/qwebengineurlrequestjob.cpp
index 41b43d42..bc860b3b 100644
--- a/src/core/api/qwebengineurlrequestjob.cpp
+++ b/src/core/api/qwebengineurlrequestjob.cpp
@@ -143,7 +143,7 @@ QUrl QWebEngineUrlRequestJob::initiator() const
\since 5.13
Returns any HTTP headers added to the request.
*/
-const QMap<QByteArray, QByteArray> &QWebEngineUrlRequestJob::requestHeaders() const
+QMap<QByteArray, QByteArray> QWebEngineUrlRequestJob::requestHeaders() const
{
return d_ptr->requestHeaders();
}
diff --git a/src/core/api/qwebengineurlrequestjob.h b/src/core/api/qwebengineurlrequestjob.h
index 55ec7c6d..b2dd8baa 100644
--- a/src/core/api/qwebengineurlrequestjob.h
+++ b/src/core/api/qwebengineurlrequestjob.h
@@ -73,7 +73,7 @@ public:
QUrl requestUrl() const;
QByteArray requestMethod() const;
QUrl initiator() const;
- const QMap<QByteArray, QByteArray> &requestHeaders() const;
+ QMap<QByteArray, QByteArray> requestHeaders() const;
void reply(const QByteArray &contentType, QIODevice *device);
void fail(Error error);
diff --git a/src/core/net/url_request_custom_job_delegate.cpp b/src/core/net/url_request_custom_job_delegate.cpp
index 83d47e29..b5a7a55a 100644
--- a/src/core/net/url_request_custom_job_delegate.cpp
+++ b/src/core/net/url_request_custom_job_delegate.cpp
@@ -83,7 +83,7 @@ QUrl URLRequestCustomJobDelegate::initiator() const
return m_initiatorOrigin;
}
-const QMap<QByteArray, QByteArray> &URLRequestCustomJobDelegate::requestHeaders() const
+QMap<QByteArray, QByteArray> URLRequestCustomJobDelegate::requestHeaders() const
{
return m_requestHeaders;
}
diff --git a/src/core/net/url_request_custom_job_delegate.h b/src/core/net/url_request_custom_job_delegate.h
index 9de0224f..1bf3ade1 100644
--- a/src/core/net/url_request_custom_job_delegate.h
+++ b/src/core/net/url_request_custom_job_delegate.h
@@ -81,7 +81,7 @@ public:
QUrl url() const;
QByteArray method() const;
QUrl initiator() const;
- const QMap<QByteArray, QByteArray> &requestHeaders() const;
+ QMap<QByteArray, QByteArray> requestHeaders() const;
void reply(const QByteArray &contentType, QIODevice *device);
void redirect(const QUrl& url);
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index 32c00075..5b4b540c 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -648,16 +648,7 @@ QWebEngineScriptCollection *QWebEngineProfile::scripts() const
\since 5.13
\sa QWebEngineNotification
*/
-void QWebEngineProfile::setNotificationPresenter(const std::function<void(const QWebEngineNotification &)> &notificationPresenter)
-{
- Q_D(QWebEngineProfile);
- d->m_notificationPresenter = notificationPresenter;
-}
-
-/*!
- \overload
-*/
-void QWebEngineProfile::setNotificationPresenter(std::function<void(const QWebEngineNotification &)> &&notificationPresenter)
+void QWebEngineProfile::setNotificationPresenter(std::function<void(const QWebEngineNotification &)> notificationPresenter)
{
Q_D(QWebEngineProfile);
d->m_notificationPresenter = std::move(notificationPresenter);
@@ -809,12 +800,13 @@ void QWebEngineProfile::removeAllUrlSchemeHandlers()
/*!
\since 5.13
- Sets this profile to be used for downloading and caching when needed during
- certificate verification, for instance for OCSP, CRLs, and AIA.
+ Sets if this profile is to be used for downloading and caching when needed
+ during certificate verification, for instance for OCSP, CRLs, and AIA.
Only one QWebEngineProfile can do this at a time, and it is recommended
that the profile fullfilling this role has a disk HTTP cache to avoid
- needlessly re-downloading.
+ needlessly re-downloading. If you set the option on a second profile,
+ it will be disabled on the profile it is currently set.
Currently only affects Linux/NSS installations where it enables OCSP.
@@ -823,10 +815,10 @@ void QWebEngineProfile::removeAllUrlSchemeHandlers()
\sa isUsedForGlobalCertificateVerification(), httpCacheType()
*/
-void QWebEngineProfile::setUseForGlobalCertificateVerification()
+void QWebEngineProfile::setUseForGlobalCertificateVerification(bool enabled)
{
Q_D(QWebEngineProfile);
- d->profileAdapter()->setUseForGlobalCertificateVerification();
+ d->profileAdapter()->setUseForGlobalCertificateVerification(enabled);
}
/*!
diff --git a/src/webenginewidgets/api/qwebengineprofile.h b/src/webenginewidgets/api/qwebengineprofile.h
index 5ad999c0..6ffbd8a6 100644
--- a/src/webenginewidgets/api/qwebengineprofile.h
+++ b/src/webenginewidgets/api/qwebengineprofile.h
@@ -134,14 +134,13 @@ public:
void setSpellCheckEnabled(bool enabled);
bool isSpellCheckEnabled() const;
- void setUseForGlobalCertificateVerification();
+ void setUseForGlobalCertificateVerification(bool enabled = true);
bool isUsedForGlobalCertificateVerification() const;
QString downloadPath() const;
void setDownloadPath(const QString &path);
- void setNotificationPresenter(const std::function<void(const QWebEngineNotification &)> &notificationPresenter);
- void setNotificationPresenter(std::function<void(const QWebEngineNotification &)> &&notificationPresenter);
+ void setNotificationPresenter(std::function<void(const QWebEngineNotification &)> notificationPresenter);
static QWebEngineProfile *defaultProfile();