diff options
Diffstat (limited to 'examples/webenginewidgets/push-notifications/main.cpp')
| -rw-r--r-- | examples/webenginewidgets/push-notifications/main.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/webenginewidgets/push-notifications/main.cpp b/examples/webenginewidgets/push-notifications/main.cpp index 18a862182..950ebfc9f 100644 --- a/examples/webenginewidgets/push-notifications/main.cpp +++ b/examples/webenginewidgets/push-notifications/main.cpp @@ -20,13 +20,12 @@ int main(int argc, char *argv[]) QWebEngineView view(profile.data()); auto popup = new NotificationPopup(&view); - QObject::connect(view.page(), &QWebEnginePage::featurePermissionRequested, - [&](const QUrl &origin, QWebEnginePage::Feature feature) { - if (feature != QWebEnginePage::Notifications) + QObject::connect(view.page(), &QWebEnginePage::permissionRequested, + [&](QWebEnginePermission permission) { + if (permission.feature() != QWebEnginePage::Notifications) return; - view.page()->setFeaturePermission(origin, feature, - QWebEnginePage::PermissionGrantedByUser); + permission.grant(); }); profile->setPushServiceEnabled(true); |
