ColorSchemeEditor does not save FillStyle correctly in non-english locales env
Description
ColorSchemeEditor does not save FillStyle correctly in non-english locales env.
If you are using other languages, such as Chinese, when editing color scheme and then click apply, the FillStyle will always be Tile
which is the first selection of combobox.
System env
- System: Archlinux with kernel version 5.18.6
- Kde plasma version: 5.25.1
- Kde framework version: 5.95.0
- QT version: 5.15.5
Why this issue occurs
After I clone the source code and debug on my laptop, I found the scheme editor bind(connect) the function currentTextChanged
to the combobox of fill style. And the receiver function accepts the raw text
of the combobox and does not translate to text that QMetaEnum can recognize. So the FillStyle
will always be Tile
which is the first selection.
How to fix
use currentIndexChanged
instead on currentTextChanged
to handler combobox change event, and translate the index to Enum.