aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/browser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index e462280..5a35a9e 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -154,8 +154,9 @@ std::shared_ptr<WebEngineProfile> Browser::profile(const QString &storageName)
}
_profile->setRequestInterceptor(m_urlRequestInterceptor);
- _profile->cookieStore()->setCookieFilter([this](QWebEngineCookieStore::FilterRequest &request) {
- request.accepted = !m_cookieInterceptor->shouldBlock(request);
+ _profile->cookieStore()->setCookieFilter([this](const QWebEngineCookieStore::FilterRequest &request) {
+ // If the cookie access is to be accepted, the filter function should return true; otherwise it should return false.
+ return !m_cookieInterceptor->shouldBlock(request);
});
connect(_profile.get(), &WebEngineProfile::downloadRequested, m_downloadManager.get(), &DownloadsWidget::addDownload);