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:
parent
a1a3b9b656
commit
69feba45ee
1 changed files with 9 additions and 6 deletions
|
@ -50,7 +50,10 @@ KCM.ScrollViewKCM {
|
||||||
highlightMoveDuration: Kirigami.Units.longDuration
|
highlightMoveDuration: Kirigami.Units.longDuration
|
||||||
|
|
||||||
displaced: Transition {
|
displaced: Transition {
|
||||||
NumberAnimation { properties: "y"; duration: Kirigami.Units.longDuration }
|
NumberAnimation {
|
||||||
|
properties: "y"
|
||||||
|
duration: Kirigami.Units.longDuration
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
|
@ -120,7 +123,7 @@ KCM.ScrollViewKCM {
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: exportInfo.visible
|
checked: exportInfo.visible
|
||||||
onToggled: {
|
onToggled: {
|
||||||
selectedIndexes = []
|
selectedIndexes = [];
|
||||||
exportInfo.visible = checked;
|
exportInfo.visible = checked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,8 +131,8 @@ KCM.ScrollViewKCM {
|
||||||
|
|
||||||
component RuleBookDelegate : Item {
|
component RuleBookDelegate : Item {
|
||||||
// External item required to make Kirigami.ListItemDragHandle work
|
// External item required to make Kirigami.ListItemDragHandle work
|
||||||
width : ruleBookView.width
|
width: ruleBookView.width
|
||||||
implicitHeight : ruleBookItem.implicitHeight
|
implicitHeight: ruleBookItem.implicitHeight
|
||||||
|
|
||||||
ListView.onPooled: {
|
ListView.onPooled: {
|
||||||
if (descriptionField.activeFocus) {
|
if (descriptionField.activeFocus) {
|
||||||
|
@ -146,7 +149,7 @@ KCM.ScrollViewKCM {
|
||||||
visible: !exportInfo.visible
|
visible: !exportInfo.visible
|
||||||
listItem: ruleBookItem
|
listItem: ruleBookItem
|
||||||
listView: ruleBookView
|
listView: ruleBookView
|
||||||
onMoveRequested: {
|
onMoveRequested: (oldIndex, newIndex) => {
|
||||||
kcm.moveRule(oldIndex, newIndex);
|
kcm.moveRule(oldIndex, newIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +164,7 @@ KCM.ScrollViewKCM {
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
kcm.setRuleDescription(index, text);
|
kcm.setRuleDescription(index, text);
|
||||||
}
|
}
|
||||||
Keys.onPressed: {
|
Keys.onPressed: event => {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case Qt.Key_Escape:
|
case Qt.Key_Escape:
|
||||||
// On <Esc> key reset to model data before losing focus
|
// On <Esc> key reset to model data before losing focus
|
||||||
|
|
Loading…
Reference in a new issue