From 054c18b0d335570b30c2b26df168401c6fbd7334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Fri, 25 Aug 2023 14:49:09 +0200 Subject: [PATCH] stocqt: Use named signal parameters Fix QML runtime warnings: qt.qml.context: qrc:/demos/stocqt/content/StockListDelegate.qml:99:13 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead. qt.qml.context: qrc:/demos/stocqt/content/StockListDelegate.qml:63:13 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead. Pick-to: 6.5 6.6 Change-Id: I2d3d5fe6db56456777d7df0c8fbfda970994a22e Reviewed-by: Ulf Hermann --- examples/demos/stocqt/content/StockListDelegate.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/demos/stocqt/content/StockListDelegate.qml b/examples/demos/stocqt/content/StockListDelegate.qml index 16796d547..87bcb3802 100644 --- a/examples/demos/stocqt/content/StockListDelegate.qml +++ b/examples/demos/stocqt/content/StockListDelegate.qml @@ -60,7 +60,7 @@ Rectangle { horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter text: change - onTextChanged: { + onTextChanged: (text) => { if (parseFloat(text) >= 0.0) color = "#328930"; else @@ -96,7 +96,7 @@ Rectangle { horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter text: changePercentage - onTextChanged: { + onTextChanged: (text) => { if (parseFloat(text) >= 0.0) color = "#328930"; else