diff options
Diffstat (limited to 'src/webenginewidgets/api')
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.cpp | 22 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.h | 5 |
2 files changed, 9 insertions, 18 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index 32c000755..5b4b540cc 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 &)> ¬ificationPresenter) -{ - Q_D(QWebEngineProfile); - d->m_notificationPresenter = notificationPresenter; -} - -/*! - \overload -*/ -void QWebEngineProfile::setNotificationPresenter(std::function<void(const QWebEngineNotification &)> &¬ificationPresenter) +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 5ad999c00..6ffbd8a66 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 &)> ¬ificationPresenter); - void setNotificationPresenter(std::function<void(const QWebEngineNotification &)> &¬ificationPresenter); + void setNotificationPresenter(std::function<void(const QWebEngineNotification &)> notificationPresenter); static QWebEngineProfile *defaultProfile(); |