[master/Qt6] qt.qml.context: qrc:/dialpad/Dialpad.qml Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
On plasma-dialer built from today master (after fixing the other Qt6 segfault issue), this is the outcome when pressing all the buttons of the dialpad:
oneplus-enchilada:~/plasmadialer$ plasmaphonedialer
kf.quickcharts.datasource: ModelSource: Invalid role -1 "color"
kf.quickcharts.datasource: ModelSource: Invalid role -1 "color"
kf.coreaddons: The plugin "/usr/lib/qt6/plugins/kpeople/datasource/KPeopleVCard.so" explicitly states an Id in the embedded metadata, which is different from the one derived from the filename The Id field from the KPlugin object in the metadata should be removed
void ActiveCallModel::onUtilsCallsChanged(const DialerTypes::CallDataVector&) 0 0
qt.qml.context: qrc:/dialpad/Dialpad.qml:99:9 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:103:43 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:104:43 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:106:43 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:107:43 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:108:43 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:110:44 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:111:43 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:112:44 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:114:60 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:115:58 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
qt.qml.context: qrc:/dialpad/Dialpad.qml:116:60 Parameter "text" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
then I've tried the following
diff --git a/plasma-dialer/src/qml/dialpad/Dialpad.qml b/plasma-dialer/src/qml/dialpad/Dialpad.qml
index dc6ae52..dcc6e55 100644
--- a/plasma-dialer/src/qml/dialpad/Dialpad.qml
+++ b/plasma-dialer/src/qml/dialpad/Dialpad.qml
@@ -96,25 +96,25 @@ GridLayout {
DialerButton {
id: one
text: "1"
- onClicked: onPadNumberPressed(text)
+ onClicked: (text)=>onPadNumberPressed(text)
voicemail: showBottomRow // TODO: only show voicemail icon if voicemail number exists
onHeld: !callActive && callVoicemail()
}
- DialerButton { text: "2"; sub: "ABC"; onClicked: onPadNumberPressed(text) }
- DialerButton { text: "3"; sub: "DEF"; onClicked: onPadNumberPressed(text) }
+ DialerButton { text: "2"; sub: "ABC"; onClicked: (text)=>onPadNumberPressed(text) }
+ DialerButton { text: "3"; sub: "DEF"; onClicked: (text)=>onPadNumberPressed(text) }
- DialerButton { text: "4"; sub: "GHI"; onClicked: onPadNumberPressed(text) }
- DialerButton { text: "5"; sub: "JKL"; onClicked: onPadNumberPressed(text) }
- DialerButton { text: "6"; sub: "MNO"; onClicked: onPadNumberPressed(text) }
+ DialerButton { text: "4"; sub: "GHI"; onClicked: (text)=>onPadNumberPressed(text) }
+ DialerButton { text: "5"; sub: "JKL"; onClicked: (text)=>onPadNumberPressed(text) }
+ DialerButton { text: "6"; sub: "MNO"; onClicked: (text)=>onPadNumberPressed(text) }
- DialerButton { text: "7"; sub: "PQRS"; onClicked: onPadNumberPressed(text) }
- DialerButton { text: "8"; sub: "TUV"; onClicked: onPadNumberPressed(text) }
- DialerButton { text: "9"; sub: "WXYZ"; onClicked: onPadNumberPressed(text) }
-
- DialerButton { display: "*"; text: "*"; special: true; onClicked: onPadNumberPressed(text); onHeld: onPadNumberPressed(text) }
- DialerButton { text: "0"; subdisplay: "+"; sub: "+"; onClicked: onPadNumberPressed(text); onHeld: onPadNumberPressed("+") }
- DialerButton { display: "#"; text: "#"; special: true; onClicked: onPadNumberPressed(text); onHeld: onPadNumberPressed(text) }
+ DialerButton { text: "7"; sub: "PQRS"; onClicked: (text)=>onPadNumberPressed(text) }
+ DialerButton { text: "8"; sub: "TUV"; onClicked: (text)=>onPadNumberPressed(text) }
+ DialerButton { text: "9"; sub: "WXYZ"; onClicked: (text)=>onPadNumberPressed(text) }
+ DialerButton { display: "*"; text: "*"; special: true; onClicked: (text)=>onPadNumberPressed(text); onHeld: (text)=>onPadNumberPressed(text) }
+ DialerButton { text: "0"; subdisplay: "+"; sub: "+"; onClicked: (text)=>onPadNumberPressed(text); onHeld: onPadNumberPressed("+") }
+ DialerButton { display: "#"; text: "#"; special: true; onClicked: (text)=>onPadNumberPressed(text); onHeld: (text)=>onPadNumberPressed(text) }
+/*
Keys.onPressed: (event)=> {
if (event.key === Qt.Key_Backspace) {
pad.number = pad.number.slice(0, -1)
@@ -128,7 +128,7 @@ GridLayout {
onPadNumberPressed(event.text)
}
}
-
+*/
Item {
visible: pad.showBottomRow
Layout.fillWidth: true
i.e. for every number, I've changed onClicked: onPadNumberPressed(text)
with onClicked: (text)=>onPadNumberPressed(text)
and I've commented this entire section
Keys.onPressed: (event)=> {
if (event.key === Qt.Key_Backspace) {
pad.number = pad.number.slice(0, -1)
} else if (
(event.key === Qt.Key_Enter || event.key === Qt.Key_Return) &&
pad.showBottomRow &&
statusLabel.text.length > 0
) {
onCallButtonPressed(pad.number)
} else if (["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "#", "+"].includes(event.text)) {
onPadNumberPressed(event.text)
}
}
and the dialpad still seems to work correctly, then I'm wondering if the section between lines 118-130 of plasma-dialer/src/qml/dialpad/Dialpad.qml
is needed after all...