Skip to content

make kcm_keyboard use xkbregistry (fixes bug 432818)

I changed kcms/keyboard/xkb_rules.(cpp|h) to use xkbregistry. That part seems to work well in my tests (layouts in ~/.config/xkb are shown).

There are reasons why this is a draft, on which I request some feedback:

  1. The old code checked for the version number of the rules file. I did not find any function for this in xkbregistry, but assume that this might be no longer relevant anyway and could just be ignored. In the current state, the test RulesTest::testRulesVersion (xkb_rules_test.cpp) fails to link. If this is actually required, I need to rewrite the test - otherwise I would just remove it.

  2. The path to the ruleset was set at build time by a CMake variable. This can be done with xkbregistry as well, but I feel it might be better to let xkbregistry choose it's input. Are there good reasons to use that variable, or should I remove it?

  3. I was not yet able to test actually applying the new settings. It will not work in my current session, but I assume that's because I'm not using kded or kwin (or whatever else might be responsible for this) from my development version. How do I test this without risk of breaking my system? And do I need to change code there, too?

  4. I just added "xkbregistry" into some "target_link_lbriaries". If I understand correctly, other xkb-related libs are found by some custom CMake module. If this is to be done for xkbregistry as well, it would be nice if someone with better understanding of CMake modules could take care of this.

Merge request reports