diff --git a/kcms/rules/ui/RuleItemDelegate.qml b/kcms/rules/ui/RuleItemDelegate.qml index a4046e9b9..08b55c3be 100644 --- a/kcms/rules/ui/RuleItemDelegate.qml +++ b/kcms/rules/ui/RuleItemDelegate.qml @@ -13,10 +13,6 @@ import org.kde.kcmutils as KCM QQC2.ItemDelegate { id: ruleDelegate - property bool ruleEnabled: model.enabled - - Kirigami.Theme.colorSet: Kirigami.Theme.View - width: ListView.view.width highlighted: false hoverEnabled: false @@ -76,7 +72,6 @@ QQC2.ItemDelegate { Layout.alignment: Qt.AlignVCenter visible: count > 0 - enabled: ruleEnabled model: policyModel onActivated: { @@ -90,8 +85,6 @@ QQC2.ItemDelegate { Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - enabled: model.enabled - ruleValue: model.value ruleOptions: model.options controlType: model.type diff --git a/kcms/rules/ui/RulesEditor.qml b/kcms/rules/ui/RulesEditor.qml index 51fc2e1f7..2d9e2638f 100644 --- a/kcms/rules/ui/RulesEditor.qml +++ b/kcms/rules/ui/RulesEditor.qml @@ -297,7 +297,7 @@ KCM.ScrollViewKCM { case RuleItem.Option: return options.textOfValue(value); case RuleItem.NetTypes: - var selectedValue = value.toString(2).length - 1; + const selectedValue = value.toString(2).length - 1; return options.textOfValue(selectedValue); case RuleItem.OptionList: return Array.from(value, item => options.textOfValue(item) ).join(", "); @@ -309,7 +309,7 @@ KCM.ScrollViewKCM { id: enabledRulesModel sourceModel: kcm.rulesModel filterRowCallback: (source_row, source_parent) => { - var index = sourceModel.index(source_row, 0, source_parent); + const index = sourceModel.index(source_row, 0, source_parent); return sourceModel.data(index, RulesModel.EnabledRole); } } @@ -325,13 +325,13 @@ KCM.ScrollViewKCM { filterString: searchField.text.trim().toLowerCase() filterRowCallback: (source_row, source_parent) => { - var index = sourceModel.index(source_row, 0, source_parent); + const index = sourceModel.index(source_row, 0, source_parent); - var hasSuggestion = sourceModel.data(index, RulesModel.SuggestedValueRole) != null; - var isOptional = sourceModel.data(index, RulesModel.SelectableRole); - var isEnabled = sourceModel.data(index, RulesModel.EnabledRole); + const hasSuggestion = sourceModel.data(index, RulesModel.SuggestedValueRole) != null; + const isOptional = sourceModel.data(index, RulesModel.SelectableRole); + const isEnabled = sourceModel.data(index, RulesModel.EnabledRole); - var showItem = hasSuggestion || (!onlySuggestions && isOptional && !isEnabled); + const showItem = hasSuggestion || (!onlySuggestions && isOptional && !isEnabled); if (!showItem) { return false; diff --git a/kcms/rules/ui/ValueEditor.qml b/kcms/rules/ui/ValueEditor.qml index 863a36e42..0cd867664 100644 --- a/kcms/rules/ui/ValueEditor.qml +++ b/kcms/rules/ui/ValueEditor.qml @@ -124,7 +124,7 @@ Loader { multipleChoice: true onActivated: { - let selectionList = [] + const selectionList = [] for (let i = 0; i < count; i++) { if (selectionMask & (1 << i)) { selectionList.push(model.data(model.index(i,0), Qt.UserRole)) diff --git a/kcms/rules/ui/main.qml b/kcms/rules/ui/main.qml index 9fd0a68ea..55a35a204 100644 --- a/kcms/rules/ui/main.qml +++ b/kcms/rules/ui/main.qml @@ -14,7 +14,6 @@ import org.kde.kirigami 2.12 as Kirigami KCM.ScrollViewKCM { id: rulesListKCM - // FIXME: ScrollViewKCM.qml:73:13: QML Control: Binding loop detected for property "implicitHeight" implicitWidth: Kirigami.Units.gridUnit * 35 implicitHeight: Kirigami.Units.gridUnit * 35