Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
QDS 4.2
-
None
Description
There are two ways of writing Connections:
// first way
Connections {
function onClicked(mouse) {
foo(mouse)
}
}
// second way
Connections {
onClicked: {
foo(mouse)
}
}
According to the documentation of Connections, the second way is not recommended.
However, when Connections is generated from "Connections" tab below,
The code is generated in a second way.
What is worse, they are yelled by QDS as they are deprecated. The user would argue "this is the code YOU have generated."
Warning: file:///C:/work/qt_for_mcus_study/demos/Automotive/Phone.ui.qml:40:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... } (file:///C:/work/qt_for_mcus_study/demos/Automotive/Phone.ui.qml:40, (null))
QDS should generate Connections' code in the second way, not in the first.