summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-12-09 10:46:23 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-12-16 14:44:49 +0000
commitccbe330d6bbf3c6049a57af809b648c2c4a2155e (patch)
treebf725d3657e31a968e2b4792e833a93d88dcd3c0
parent67d028e3dcbdab5ccae00b912ddb9dda7892c81e (diff)
Fix qdoc warningsv6.5.0-beta1
As JavaScript parsing issue got fixed , the limit was not changed, meaning there where 4 "unused" warnings possibilities. In the meantime another change e6a13d97898f3f4b19f61006d0716ca9e1b9f037 was merged which had 3 qdoc issues, which got therefore unnoticed. Fix those issues. Do not use underscore in example name and rename push_notification to push-notifications (like qtbase network-chat). Change-Id: I2635424e24d3b9a0a02c2e6fe8ac383eec95c112 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit cbc622f158a94fea9c6af8d675a8743e98267109) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/webenginewidgets/CMakeLists.txt2
-rw-r--r--examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc4
-rw-r--r--examples/webenginewidgets/push-notifications/CMakeLists.txt (renamed from examples/webenginewidgets/push_notifications/CMakeLists.txt)0
-rw-r--r--examples/webenginewidgets/push-notifications/content/index.html (renamed from examples/webenginewidgets/push_notifications/content/index.html)0
-rw-r--r--examples/webenginewidgets/push-notifications/content/ping.js (renamed from examples/webenginewidgets/push_notifications/content/ping.js)0
-rw-r--r--examples/webenginewidgets/push-notifications/content/style.css (renamed from examples/webenginewidgets/push_notifications/content/style.css)0
-rw-r--r--examples/webenginewidgets/push-notifications/content/worker.js (renamed from examples/webenginewidgets/push_notifications/content/worker.js)0
-rw-r--r--examples/webenginewidgets/push-notifications/doc/images/notification.png (renamed from examples/webenginewidgets/push_notifications/doc/images/notification.png)bin1279 -> 1279 bytes
-rw-r--r--examples/webenginewidgets/push-notifications/doc/images/permissions.png (renamed from examples/webenginewidgets/push_notifications/doc/images/permissions.png)bin4749 -> 4749 bytes
-rw-r--r--examples/webenginewidgets/push-notifications/doc/images/push-notifications.png (renamed from examples/webenginewidgets/push_notifications/doc/images/push_notifications.png)bin10573 -> 10573 bytes
-rw-r--r--examples/webenginewidgets/push-notifications/doc/images/website.png (renamed from examples/webenginewidgets/push_notifications/doc/images/website.png)bin7539 -> 7539 bytes
-rw-r--r--examples/webenginewidgets/push-notifications/doc/src/push-notifications.qdoc (renamed from examples/webenginewidgets/push_notifications/doc/src/push_notifications.qdoc)30
-rw-r--r--examples/webenginewidgets/push-notifications/doc/src/push-notifications.qmodel (renamed from examples/webenginewidgets/push_notifications/doc/src/push_notifications.qmodel)0
-rw-r--r--examples/webenginewidgets/push-notifications/server.js (renamed from examples/webenginewidgets/push_notifications/server.js)0
-rw-r--r--examples/webenginewidgets/push_notifications/push_notifications.pro1
-rw-r--r--examples/webenginewidgets/webenginewidgets.pro2
-rw-r--r--src/webenginewidgets/doc/snippets/push-notifications/commands (renamed from src/webenginewidgets/doc/snippets/push_notifications/commands)0
17 files changed, 19 insertions, 20 deletions
diff --git a/examples/webenginewidgets/CMakeLists.txt b/examples/webenginewidgets/CMakeLists.txt
index c94f71fb4..c3d466558 100644
--- a/examples/webenginewidgets/CMakeLists.txt
+++ b/examples/webenginewidgets/CMakeLists.txt
@@ -7,7 +7,7 @@ qt_internal_add_example(cookiebrowser)
qt_internal_add_example(notifications)
qt_internal_add_example(simplebrowser)
qt_internal_add_example(stylesheetbrowser)
-qt_internal_add_example(push_notifications)
+qt_internal_add_example(push-notifications)
qt_internal_add_example(videoplayer)
qt_internal_add_example(webui)
if(QT_FEATURE_webengine_geolocation)
diff --git a/examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc b/examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc
index 5f4eeb848..b2b67b2e2 100644
--- a/examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc
+++ b/examples/webenginewidgets/clientcertificate/doc/src/clientcertificate.qdoc
@@ -2,10 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
- \example webenginewidgets/clientcertificatesi
+ \example webenginewidgets/clientcertificate
\title WebEngine Widgets Client Certificate Example
\ingroup webengine-widgetexamples
- \brief A simple client certificate authentication scenario using \QWE and \l QSslServer
+ \brief A simple client certificate authentication scenario using \QWE and \l QSslServer.
\image selection.png
diff --git a/examples/webenginewidgets/push_notifications/CMakeLists.txt b/examples/webenginewidgets/push-notifications/CMakeLists.txt
index bbb585c9b..bbb585c9b 100644
--- a/examples/webenginewidgets/push_notifications/CMakeLists.txt
+++ b/examples/webenginewidgets/push-notifications/CMakeLists.txt
diff --git a/examples/webenginewidgets/push_notifications/content/index.html b/examples/webenginewidgets/push-notifications/content/index.html
index cce3055cd..cce3055cd 100644
--- a/examples/webenginewidgets/push_notifications/content/index.html
+++ b/examples/webenginewidgets/push-notifications/content/index.html
diff --git a/examples/webenginewidgets/push_notifications/content/ping.js b/examples/webenginewidgets/push-notifications/content/ping.js
index 285a57019..285a57019 100644
--- a/examples/webenginewidgets/push_notifications/content/ping.js
+++ b/examples/webenginewidgets/push-notifications/content/ping.js
diff --git a/examples/webenginewidgets/push_notifications/content/style.css b/examples/webenginewidgets/push-notifications/content/style.css
index 8176462a2..8176462a2 100644
--- a/examples/webenginewidgets/push_notifications/content/style.css
+++ b/examples/webenginewidgets/push-notifications/content/style.css
diff --git a/examples/webenginewidgets/push_notifications/content/worker.js b/examples/webenginewidgets/push-notifications/content/worker.js
index ed660a6e9..ed660a6e9 100644
--- a/examples/webenginewidgets/push_notifications/content/worker.js
+++ b/examples/webenginewidgets/push-notifications/content/worker.js
diff --git a/examples/webenginewidgets/push_notifications/doc/images/notification.png b/examples/webenginewidgets/push-notifications/doc/images/notification.png
index ec5c67457..ec5c67457 100644
--- a/examples/webenginewidgets/push_notifications/doc/images/notification.png
+++ b/examples/webenginewidgets/push-notifications/doc/images/notification.png
Binary files differ
diff --git a/examples/webenginewidgets/push_notifications/doc/images/permissions.png b/examples/webenginewidgets/push-notifications/doc/images/permissions.png
index dedb6e472..dedb6e472 100644
--- a/examples/webenginewidgets/push_notifications/doc/images/permissions.png
+++ b/examples/webenginewidgets/push-notifications/doc/images/permissions.png
Binary files differ
diff --git a/examples/webenginewidgets/push_notifications/doc/images/push_notifications.png b/examples/webenginewidgets/push-notifications/doc/images/push-notifications.png
index c5ba5f589..c5ba5f589 100644
--- a/examples/webenginewidgets/push_notifications/doc/images/push_notifications.png
+++ b/examples/webenginewidgets/push-notifications/doc/images/push-notifications.png
Binary files differ
diff --git a/examples/webenginewidgets/push_notifications/doc/images/website.png b/examples/webenginewidgets/push-notifications/doc/images/website.png
index 10a4a6150..10a4a6150 100644
--- a/examples/webenginewidgets/push_notifications/doc/images/website.png
+++ b/examples/webenginewidgets/push-notifications/doc/images/website.png
Binary files differ
diff --git a/examples/webenginewidgets/push_notifications/doc/src/push_notifications.qdoc b/examples/webenginewidgets/push-notifications/doc/src/push-notifications.qdoc
index 1d12a9cc1..90b5212c8 100644
--- a/examples/webenginewidgets/push_notifications/doc/src/push_notifications.qdoc
+++ b/examples/webenginewidgets/push-notifications/doc/src/push-notifications.qdoc
@@ -36,7 +36,7 @@ implementation will deliver a push message. However, to show it, a service worke
be registered. As the service worker runs in the background, it allows displaying notifications
even if a website, which has installed it, is no longer opened.
-\image push_notifications.png
+\image push-notifications.png
Let's go more into implementation details. We start with implementing our custom
push service using NodeJS with two modules:
@@ -50,11 +50,11 @@ push service using NodeJS with two modules:
Let's initialize a new project and install the required modules in the root directory of this
example:
-\snippet /push_notifications/commands 0
+\snippet /push-notifications/commands 0
These commands should create package.js, which defines the start command:
-\snippet /push_notifications/commands 1
+\snippet /push-notifications/commands 1
Now let's move on to the push service back-end implementation in server.js.
@@ -64,7 +64,7 @@ subscription at a time. To do that we need to create \e VAPID keys which we are
generate with \e web-push libs. The public key is going to be used by the front-end and authenticate
to the service.
-\quotefromfile webenginewidgets/push_notifications/server.js
+\quotefromfile webenginewidgets/push-notifications/server.js
\skipto const express
\printto add subscribe route
@@ -73,7 +73,7 @@ to the service.
To generate keys, we can use the tool shipped with \e web-push lib, that is installed by
\c npm in our example's root directory.
-\snippet /push_notifications/commands 2
+\snippet /push-notifications/commands 2
Now we add two \c routes to the push server. One to \c subscribe and one to \c unsubscribe,
so that our front-end can send an HTTP POST request to handle the push subscription.
@@ -83,20 +83,20 @@ the user. We keep around the \c subscription to be able to send push notificatio
As a confirmation, we send the 201 status code and schedule the first push notification based on
the \c ping-time value. The \c unsubscribe request simply removes a subscription.
-\quotefromfile webenginewidgets/push_notifications/server.js
+\quotefromfile webenginewidgets/push-notifications/server.js
\skipto add subscribe route
\printto function sendNotification
The \c sendNotication() function sends push messages using the web-push lib. We create the payload
with the message we want to present to a user and schedule the next push message.
-\quotefromfile webenginewidgets/push_notifications/server.js
+\quotefromfile webenginewidgets/push-notifications/server.js
\skipto function sendNotification
\printto server.listen
In the end we start the server to listen on the given port.
-\quotefromfile webenginewidgets/push_notifications/server.js
+\quotefromfile webenginewidgets/push-notifications/server.js
\skipto server.listen
\printline started
@@ -105,7 +105,7 @@ often they want to receive ping notification messages. We will have two buttons:
\e {Ping Me} to subscribe for push notifications and \e Clear to unsubscribe.
In the end we load ping.js, which we cover next.
-\quotefromfile webenginewidgets/push_notifications/content/index.html
+\quotefromfile webenginewidgets/push-notifications/content/index.html
\skipto <body>
\printuntil </body>
@@ -116,7 +116,7 @@ This way the user can leave the website and still get notified as the service wo
in the background and handles incoming messages. To achieve that, we have to first register
one with:
-\quotefromfile webenginewidgets/push_notifications/content/ping.js
+\quotefromfile webenginewidgets/push-notifications/content/ping.js
\skipto const register
\printline worker.js
@@ -125,7 +125,7 @@ user. If the permission is granted, the push subscription is returned. It includ
that allows sending notifications to the browser, where the registered service worker waits for
push messages.
-\quotefromfile webenginewidgets/push_notifications/content/ping.js
+\quotefromfile webenginewidgets/push-notifications/content/ping.js
\skipto var subscription
\printto console.log
@@ -133,14 +133,14 @@ As mentioned the subscription is created for FCM and should be now sent to our c
with an HTTP POST request. In addition, we add to the post request the HTTP header with the
\c ping-time the user entered on our website.
-\quotefromfile webenginewidgets/push_notifications/content/ping.js
+\quotefromfile webenginewidgets/push-notifications/content/ping.js
\skipto await fetch
\printto console.log
The function \c clear call unsubscribes first from our push server by sending an HTTP POST request
and later from the 3rd-party push service (FCM).
-\quotefromfile webenginewidgets/push_notifications/content/ping.js
+\quotefromfile webenginewidgets/push-notifications/content/ping.js
\skipuntil async function clear()
\skipuntil {
\printto console.log
@@ -157,7 +157,7 @@ and call \c setup() or \c clear().
As the last part of the front-end let's look inside a service worker script, where we simply
register an event listener for \e push events.
-\quotefromfile webenginewidgets/push_notifications/content/worker.js
+\quotefromfile webenginewidgets/push-notifications/content/worker.js
\skipto self
\printuntil });
\printuntil });
@@ -170,7 +170,7 @@ the look and feel of a notification message.
Having the implementation in place, we can start the server on localhost at the port 5000.
To do that, we can simply enter in the console in the project's root directory:
-\snippet /push_notifications/commands 3
+\snippet /push-notifications/commands 3
Now we can fire up \e simplebrowser and enter \c http:\\localhost:5000 as a URL.
diff --git a/examples/webenginewidgets/push_notifications/doc/src/push_notifications.qmodel b/examples/webenginewidgets/push-notifications/doc/src/push-notifications.qmodel
index 048a55911..048a55911 100644
--- a/examples/webenginewidgets/push_notifications/doc/src/push_notifications.qmodel
+++ b/examples/webenginewidgets/push-notifications/doc/src/push-notifications.qmodel
diff --git a/examples/webenginewidgets/push_notifications/server.js b/examples/webenginewidgets/push-notifications/server.js
index fc7deb08a..fc7deb08a 100644
--- a/examples/webenginewidgets/push_notifications/server.js
+++ b/examples/webenginewidgets/push-notifications/server.js
diff --git a/examples/webenginewidgets/push_notifications/push_notifications.pro b/examples/webenginewidgets/push_notifications/push_notifications.pro
deleted file mode 100644
index f88018da2..000000000
--- a/examples/webenginewidgets/push_notifications/push_notifications.pro
+++ /dev/null
@@ -1 +0,0 @@
-message("Please use simplebrowser example to see notificationsi.")
diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro
index c22df271d..cfddfdaae 100644
--- a/examples/webenginewidgets/webenginewidgets.pro
+++ b/examples/webenginewidgets/webenginewidgets.pro
@@ -9,7 +9,7 @@ SUBDIRS += \
notifications \
simplebrowser \
stylesheetbrowser \
- push_notifications \
+ push-notifications \
videoplayer \
webui
diff --git a/src/webenginewidgets/doc/snippets/push_notifications/commands b/src/webenginewidgets/doc/snippets/push-notifications/commands
index aee9761c1..aee9761c1 100644
--- a/src/webenginewidgets/doc/snippets/push_notifications/commands
+++ b/src/webenginewidgets/doc/snippets/push-notifications/commands