kcms/rules: Port signal handlers to explicit arguments, fix QML/JS code style

Implicit injection of arguments is deprecated in Qt 6, and throws runtime warnings.
This commit is contained in:
ivan tkachenko 2023-06-02 19:47:08 +03:00
parent a1a3b9b656
commit 69feba45ee
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -50,7 +50,10 @@ KCM.ScrollViewKCM {
highlightMoveDuration: Kirigami.Units.longDuration
displaced: Transition {
NumberAnimation { properties: "y"; duration: Kirigami.Units.longDuration }
NumberAnimation {
properties: "y"
duration: Kirigami.Units.longDuration
}
}
Kirigami.PlaceholderMessage {
@ -120,7 +123,7 @@ KCM.ScrollViewKCM {
checkable: true
checked: exportInfo.visible
onToggled: {
selectedIndexes = []
selectedIndexes = [];
exportInfo.visible = checked;
}
}
@ -146,7 +149,7 @@ KCM.ScrollViewKCM {
visible: !exportInfo.visible
listItem: ruleBookItem
listView: ruleBookView
onMoveRequested: {
onMoveRequested: (oldIndex, newIndex) => {
kcm.moveRule(oldIndex, newIndex);
}
}
@ -161,7 +164,7 @@ KCM.ScrollViewKCM {
onEditingFinished: {
kcm.setRuleDescription(index, text);
}
Keys.onPressed: {
Keys.onPressed: event => {
switch (event.key) {
case Qt.Key_Escape:
// On <Esc> key reset to model data before losing focus