aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2023-06-14 17:01:08 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-06-21 10:00:48 +0000
commit33321f8da24fdd3a756bebf1eaeb7e2c2b51686e (patch)
tree6b87c04ef397dfb46ee6d1e177071f4e862b88fe
parent86acef35066fdfa2eac0f8ba80d2d89202794b03 (diff)
CoAP Multicast Discovery example: fix injection of parameters warnings
Fix the warnings like Parameter "resource" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead. by doing what is recommended. Task-number: QTBUG-113858 Change-Id: Ia936cdc620457c438ae1f8dd70f1ad120f46de67 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 23956255e2c4d668ac8b8969399513927697ff45) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/coap/quickmulticastclient/Main.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/coap/quickmulticastclient/Main.qml b/examples/coap/quickmulticastclient/Main.qml
index c7e1dbe..c75130d 100644
--- a/examples/coap/quickmulticastclient/Main.qml
+++ b/examples/coap/quickmulticastclient/Main.qml
@@ -21,9 +21,9 @@ Window {
CoapMulticastClient {
id: client
- onDiscovered: addResource(resource)
+ onDiscovered: (resource) => { addResource(resource) }
- onFinished: {
+ onFinished: (error) => {
statusLabel.text = (error === QtCoap.Error.Ok)
? qsTr("Finished resource discovery.")
: qsTr("Resource discovery failed with error code: %1").arg(error)