summaryrefslogtreecommitdiffstats
path: root/tests/quicktestbrowser
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-03-16 11:16:48 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-03-16 18:26:29 +0000
commit327fcc7fd3396219a29a6c8d38dc4774e410c1e9 (patch)
tree12d594340295fe58efe0a35a7ab266bf09f2990d /tests/quicktestbrowser
parent29a9f9d6e4ad9ffee62d3633edb17c1be335203e (diff)
Switch cookie-filter API to std::function
Allows us to use return value instead of magic properties Task-number: QTBUG-66825 Change-Id: I55202a7aca2e662bc214b05caf767d2da496f026 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'tests/quicktestbrowser')
-rw-r--r--tests/quicktestbrowser/main.cpp4
1 files changed, 2 insertions, 2 deletions
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");