diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-12-15 15:21:25 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2022-12-22 14:30:46 +0100 |
commit | 4bedbe65c8af21e29e3ed274334ce1d32c8f9279 (patch) | |
tree | 5fd643be4d32856ee6c5f6d3c03d80c87c45f82f /src/webenginequick/api | |
parent | 3172695838372b54c2a488975578eaedaf094e80 (diff) | |
download | qtwebengine-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/webenginequick/api')
-rw-r--r-- | src/webenginequick/api/qquickwebengineprofile.cpp | 40 | ||||
-rw-r--r-- | src/webenginequick/api/qquickwebengineprofile.h | 8 |
2 files changed, 20 insertions, 28 deletions
diff --git a/src/webenginequick/api/qquickwebengineprofile.cpp b/src/webenginequick/api/qquickwebengineprofile.cpp index 131e59ad0..1badd25be 100644 --- a/src/webenginequick/api/qquickwebengineprofile.cpp +++ b/src/webenginequick/api/qquickwebengineprofile.cpp @@ -821,46 +821,38 @@ QString QQuickWebEngineProfile::downloadPath() const } /*! - \qmlproperty string WebEngineProfile::pushServiceEndpoint + \qmlproperty bool WebEngineProfile::isPushServiceEnabled \since QtWebEngine 6.5 - The address used to create subscriptions for a push messaging service. - - 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/} - - \note By default, the endpoint is an empty URL and push messaging is disabled. + Whether the push messaging service is enabled. + \note By default the push messaging service is disabled. + \note \QWE uses the \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. */ /*! - \property QQuickWebEngineProfile::pushServiceEndpoint + \property QQuickWebEngineProfile::isPushServiceEnabled \since QtWebEngine 6.5 - The address used to create subscriptions for a push messaging service. - - 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/} - - \note By default, the endpoint is an empty URL and push messaging is disabled. + Whether the push messaging service is enabled. + \note By default the push messaging service is disabled. + \note \QWE uses the \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. */ -QUrl QQuickWebEngineProfile::pushServiceEndpoint() const +bool QQuickWebEngineProfile::isPushServiceEnabled() const { const Q_D(QQuickWebEngineProfile); - return d->profileAdapter()->pushServiceEndpoint(); + return d->profileAdapter()->pushServiceEnabled(); } -void QQuickWebEngineProfile::setPushServiceEndpoint(const QUrl &endpoint) +void QQuickWebEngineProfile::setPushServiceEnabled(bool enabled) { Q_D(QQuickWebEngineProfile); - if (pushServiceEndpoint() == endpoint) + if (isPushServiceEnabled() == enabled) return; - d->profileAdapter()->setPushServiceEndpoint(endpoint); - emit pushServiceEndpointChanged(); + d->profileAdapter()->setPushServiceEnabled(enabled); + emit pushServiceEnabledChanged(); } /*! diff --git a/src/webenginequick/api/qquickwebengineprofile.h b/src/webenginequick/api/qquickwebengineprofile.h index 36789acf0..29d6ee0b2 100644 --- a/src/webenginequick/api/qquickwebengineprofile.h +++ b/src/webenginequick/api/qquickwebengineprofile.h @@ -37,7 +37,7 @@ class Q_WEBENGINEQUICK_EXPORT QQuickWebEngineProfile : public QObject { Q_PROPERTY(bool spellCheckEnabled READ isSpellCheckEnabled WRITE setSpellCheckEnabled NOTIFY spellCheckEnabledChanged FINAL REVISION(1,3)) Q_PROPERTY(QQuickWebEngineScriptCollection *userScripts READ userScripts) Q_PROPERTY(QString downloadPath READ downloadPath WRITE setDownloadPath NOTIFY downloadPathChanged FINAL REVISION(1,5)) - Q_PROPERTY(QUrl pushServiceEndpoint READ pushServiceEndpoint WRITE setPushServiceEndpoint NOTIFY pushServiceEndpointChanged FINAL REVISION(6,5)) + Q_PROPERTY(bool isPushServiceEnabled READ isPushServiceEnabled WRITE setPushServiceEnabled NOTIFY pushServiceEnabledChanged FINAL REVISION(6,5)) QML_NAMED_ELEMENT(WebEngineProfile) QML_ADDED_IN_VERSION(1, 1) QML_EXTRA_VERSION(2, 0) @@ -109,8 +109,8 @@ public: QString downloadPath() const; void setDownloadPath(const QString &path); - QUrl pushServiceEndpoint() const; - void setPushServiceEndpoint(const QUrl &endpoint); + bool isPushServiceEnabled() const; + void setPushServiceEnabled(bool enable); QWebEngineClientCertificateStore *clientCertificateStore(); @@ -129,7 +129,7 @@ Q_SIGNALS: Q_REVISION(1,3) void spellCheckLanguagesChanged(); Q_REVISION(1,3) void spellCheckEnabledChanged(); Q_REVISION(1,5) void downloadPathChanged(); - Q_REVISION(6,5) void pushServiceEndpointChanged(); + Q_REVISION(6,5) void pushServiceEnabledChanged(); void downloadRequested(QQuickWebEngineDownloadRequest *download); void downloadFinished(QQuickWebEngineDownloadRequest *download); |