Commit a158d3cb authored by Ismael Asensio's avatar Ismael Asensio

Rules kcm: Use new property ComboBox.currentValue

Use the properties `valueRole` and `currentValue`, introduced in Qt5.14 for `QQC2.ComboBox`

This didn't work before due to QQC2 version being mis-detected at build time, so the code mocked an internal `currentValue` property.

After D28859, it is now required to fix:
   "Error loading QML file.\n42: Type RuleItemDelegate unavailable\n68: Type OptionsComboBox unavailable\n35: Cannot override FINAL property\n"
   QCoreApplication::postEvent: Unexpected null receiver

Test Plan:
Try to edit a rule or add a new one.
The rule editor page shows.

Reviewers: ngraham, #kwin, zzag

Reviewed By: ngraham, #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent 890c7700
......@@ -29,15 +29,7 @@ QQC2.ComboBox {
id: optionsCombo
textRole: "display"
//TODO: After KF5 (qqc2-desktop-style) depends on Qt 5.15 this can be simplified using newer API
// (
// valueRole: "value"
property var currentValue
onActivated: (index) => {
var modelIndex = model.index(index, 0);
currentValue =, Qt.UserRole);
valueRole: "value"
property bool multipleChoice: false
property int selectionMask: 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment