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 <ulf.hermann@qt.io>
This commit is contained in:
Kai Köhne 2023-08-25 14:49:09 +02:00
parent 6eaab0704d
commit 054c18b0d3
1 changed files with 2 additions and 2 deletions

View File

@ -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