The keyboard KCM save button status isn't activated by changing the main layout count
Just changing the main layout count in the Keyboard settings module doesn't activate the "Apply" nor the "Reset" buttons.
Doing some other change (for example adding a new keyboard layout) activates those buttons, and performing the save also stores the main layout count.
This was tested on Kubuntu 22.04 (Plasma 5.24.4).
I think the problem is in KeyboardLayouts::layoutsSaveNeeded()
not considering KeyboardLayouts::layoutLoopCount()
.
I would be happy to provide a pull request fixing this issue, but this may be the opportunity for a broader refactoring, for example adding a KeyboardLayouts::isSaveNeeded()
method calling KeyboardLayouts::layoutsSaveNeeded()
as well as comparing the current layoutLoopCount
to the original count, which is not saved at the moment. Only the original layout list is saved in KeyboardConfig::m_referenceLayouts
; the whole state of KeyboardSettingsBase
doesn't appear to be saved, but I am not knowledgeable with the KCM architecture so I can't tell if this is done implicitely.