summaryrefslogtreecommitdiff
path: root/src/core/api
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-12-15 15:21:25 +0100
committerMichal Klocek <michal.klocek@qt.io>2022-12-22 14:30:46 +0100
commit4bedbe65c8af21e29e3ed274334ce1d32c8f9279 (patch)
tree5fd643be4d32856ee6c5f6d3c03d80c87c45f82f /src/core/api
parent3172695838372b54c2a488975578eaedaf094e80 (diff)
downloadqtwebengine-4bedbe65c8af21e29e3ed274334ce1d32c8f9279.tar.gz
Remove setPushServiceEndpoint from API
Use setPushServiceEnabled instead. Update also getter and documentation. Task-number: QTBUG-107442 Pick-to: 6.5 Change-Id: I299ce88b06edef0f1a0088fb10f4a142056039be Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/api')
-rw-r--r--src/core/api/qwebengineprofile.cpp28
-rw-r--r--src/core/api/qwebengineprofile.h4
2 files changed, 14 insertions, 18 deletions
diff --git a/src/core/api/qwebengineprofile.cpp b/src/core/api/qwebengineprofile.cpp
index 8c3dc8f3d..fe783b75e 100644
--- a/src/core/api/qwebengineprofile.cpp
+++ b/src/core/api/qwebengineprofile.cpp
@@ -392,36 +392,32 @@ void QWebEngineProfile::setDownloadPath(const QString &path)
/*!
\since 6.5
- The address used to create subscriptions for a push messaging service.
+ Returns \c true if the push messaging service is enabled.
+ \note By default the push messaging service is disabled.
- \note By default, the endpoint is an empty URL and push messaging is disabled.
-
- \sa setPushServiceEndpoint()
+ \sa setPushServiceEnabled()
*/
-QUrl QWebEngineProfile::pushServiceEndpoint() const
+bool QWebEngineProfile::isPushServiceEnabled() const
{
const Q_D(QWebEngineProfile);
- return d->profileAdapter()->pushServiceEndpoint();
+ return d->profileAdapter()->pushServiceEnabled();
}
/*!
\since 6.5
- Enables push messaging feature by setting \a endpoint to a valid address used as a
- push messaging service endpoint. Subscription requests for the push service will be
- sent to the concatenation of \a endpoint and a subscription ID (which is provided
- by the browser engine).
-
- \note Default endpoint used by Google Chrome browser is \c {https://fcm.googleapis.com/fcm/send/}
+ Enables the push messaging service if \a enable is \c true, otherwise disables it.
- If set back to the default empty URL, push messaging is disabled.
+ \note \QWE uses \l {https://firebase.google.com}{Firebase Cloud Messaging (FCM)}
+ as a browser push service. Therefore, all push messages will go through the
+ Google push service and its respective servers.
- \sa pushServiceEndpoint()
+ \sa isPushServiceEnabled()
*/
-void QWebEngineProfile::setPushServiceEndpoint(const QUrl &endpoint)
+void QWebEngineProfile::setPushServiceEnabled(bool enable)
{
Q_D(QWebEngineProfile);
- d->profileAdapter()->setPushServiceEndpoint(endpoint);
+ d->profileAdapter()->setPushServiceEnabled(enable);
}
/*!
diff --git a/src/core/api/qwebengineprofile.h b/src/core/api/qwebengineprofile.h
index cd711727b..9fb4c8e74 100644
--- a/src/core/api/qwebengineprofile.h
+++ b/src/core/api/qwebengineprofile.h
@@ -98,8 +98,8 @@ public:
QString downloadPath() const;
void setDownloadPath(const QString &path);
- QUrl pushServiceEndpoint() const;
- void setPushServiceEndpoint(const QUrl &endpoint);
+ bool isPushServiceEnabled() const;
+ void setPushServiceEnabled(bool enabled);
void setNotificationPresenter(std::function<void(std::unique_ptr<QWebEngineNotification>)> notificationPresenter);