From ae022e92c9f516877fa59d5104a84c981895cddf Mon Sep 17 00:00:00 2001 From: Eugene Popov Date: Sun, 29 Mar 2020 18:13:55 -0600 Subject: [PATCH] [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 --- kcmkwin/kwindesktop/package/contents/ui/main.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/kcmkwin/kwindesktop/package/contents/ui/main.qml b/kcmkwin/kwindesktop/package/contents/ui/main.qml index 5e0f39b267..770bc22d68 100644 --- a/kcmkwin/kwindesktop/package/contents/ui/main.qml +++ b/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 }