Skip to content

[1/3] Keyboard dbus

Andrey Butirsky requested to merge (removed):keyboard-dbus into master

plasma-workspace!567 (merged)
plasma-desktop!293 (merged)

  • refactor: keyboard layout applet: return to Properties-based QML API

    As all layouts names are now stored in Property on client side, there is no need for KeyboardLayoutDBusInterface::getLayoutLongName() method any more.

  • fix: Clazy detached QVector warning [clazy-range-loop]

    warning: c++11 range-loop might detach Qt container (QVector) [clazy- range-loop]

  • fix: KeyboardLayoutTest fails on updated DBus API

    Address changes in methods:

    • setLayout()
    • layoutNames()
    • layoutChanged() signal
  • refactor: pass layout in KeyboardLayout::layoutChanged() signal argument

    On that signal, we asquare the new layout anyway all over the places.
    Better just pass it along with the signal instead.

    Also it's in-line with DBus API signal.

  • impr: keyboard layout DBus API: rework to index based

    The base handle for layouts in libxkbcommon is an index. Let's follow this notion in our API to set/get layout, instead of using it's name as an ID.

    On the way, do cleanup. Following methods are removed as not needed any more:

    • layoutShortNames()
    • layoutNames()
  • fix: keyboard layout applet: no flag if Display Name is set

    If user set custom name for the layout, country flag is not displayed. Instead, Display Name is shown in the applet.

    This reveals shortcomings in current DBus API design. We need more data to pass over DBus to fix this. Then, multiple improvements are possible:

    • fix aforementioned bug
    • add flags to context menu
    • display correct translated Layout Name in the context menu
    • simpler, cleaner DBus API and applet implementation
    • etc.

@davidedmundson

Edited by Andrey Butirsky

Merge request reports