[kcmkwin/kwindesktop] Implement valueFromText in a spinbox

If textFromValue is set, valueFromText must be.

A lot of other implemenetations were using parseInt() which fails at
reading "3,000" due to the comma. Qt's fromLocaleString handles that but
needs any text stripping.

This implementation isn't perfect, but really we need to work on a good
upstream solution.

BUG: 437472
master
David Edmundson 3 years ago committed by Nate Graham
parent 27e043920a
commit 5484b846b3

@ -269,6 +269,7 @@ KCM.ScrollViewKCM {
stepSize: 100
textFromValue: function(value, locale) { return i18n("%1 ms", value)}
valueFromText: function(text, locale) {return Number.fromLocaleString(locale, text.split(" ")[0])}
value: kcm.virtualDesktopsSettings.popupHideDelay

Loading…
Cancel
Save