diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2023-06-14 17:01:08 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2023-06-21 10:31:16 +0200 |
commit | 23956255e2c4d668ac8b8969399513927697ff45 (patch) | |
tree | 5ca44d970b3831120929669db75830a266e5e6b4 /examples | |
parent | ebd40ab7302e36a58596a486bc68a2587ad1eeae (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
Pick-to: 6.6 6.5
Change-Id: Ia936cdc620457c438ae1f8dd70f1ad120f46de67
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/coap/quickmulticastclient/Main.qml | 4 |
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) |