From 327fcc7fd3396219a29a6c8d38dc4774e410c1e9 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 16 Mar 2018 11:16:48 +0100 Subject: Switch cookie-filter API to std::function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows us to use return value instead of magic properties Task-number: QTBUG-66825 Change-Id: I55202a7aca2e662bc214b05caf767d2da496f026 Reviewed-by: Leena Miettinen Reviewed-by: Michael BrĂ¼ning --- tests/quicktestbrowser/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/quicktestbrowser') diff --git a/tests/quicktestbrowser/main.cpp b/tests/quicktestbrowser/main.cpp index d56841974..45661b5d4 100644 --- a/tests/quicktestbrowser/main.cpp +++ b/tests/quicktestbrowser/main.cpp @@ -80,9 +80,9 @@ int main(int argc, char **argv) Q_ASSERT(index != -1); QMetaProperty thirdPartyCookiesProperty = rootMeta->property(index); profile->cookieStore()->setCookieFilter( - [rootObject,&thirdPartyCookiesProperty](QWebEngineCookieStore::FilterRequest &request) + [rootObject,&thirdPartyCookiesProperty](const QWebEngineCookieStore::FilterRequest &request) { - request.accepted = !request.thirdParty || thirdPartyCookiesProperty.read(rootObject).toBool(); + return !request.thirdParty || thirdPartyCookiesProperty.read(rootObject).toBool(); }); index = rootMeta->indexOfProperty("testProfile"); -- cgit v1.2.3