[kcmkwin/kwindesktop] Fix inability to create more than one row on the "Virtual Desktops" settings page

Summary:
When a spinbox with the number of rows loses focus, the value of this spinbox (i.e., the count of rows) is always reset to 1. Thus, it's impossible to create more then one row.

To fix this bug, we need to implement `valueFromText` function.

BUG: 419141
FIXED-IN: 5.18.4

Reviewers: ngraham, zzag, davidedmundson

Reviewed By: ngraham, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28378
remotes/origin/work/fvogt/plastikqt5.15 v5.18.4
Eugene Popov 6 years ago committed by Nate Graham
parent f18109d9c4
commit ae022e92c9
  1. 1
      kcmkwin/kwindesktop/package/contents/ui/main.qml

@ -159,6 +159,7 @@ ScrollViewKCM {
editable: true
textFromValue: function(value, locale) { return i18np("1 Row", "%1 Rows", value)}
valueFromText: function(text, locale) { return parseInt(text, 10); }
onValueModified: kcm.desktopsModel.rows = value
}

Loading…
Cancel
Save