Rewrite of the global shortcuts kcm

Authored by davidre on Apr 28 2020, 3:36 PM.


Rewrite of the global shortcuts kcm

This is a total rewrite of the global shortcuts kcm from scratch. It uses an
abstract item model backend with a qml frontend. This resolves some issues the
old kcm inherently had because it just stacked KShortcutEditors. First it enables
a global serach/filter which either matches the component name, actions, default
or set key combinations across components. Secondly KGlobalAccel can have multiple
default/active key combinations for each action - the old kcm only exposed two each.
The new kcm displays all default or set key combinations.
The main visual structure is similiar to the old kcm. On the left there is a list
with all components but rather than divided into "Application Launchers" and
"Other Shortcuts" the sections are now called "Applications" and "System Services"
(cf. notifications kcm) and the components are now assigned whether the service
we find for a component is an application or not rather if the component was
added via .desktop file. In the main view the shortcuts are displayed. Each item
corresponds to one action. Initially each item is collapsed and shows the action
name and a list of the currently set key combinations for that action. In the
expanded form all default shortcuts are shown which can be activated or
deactivated and all other active shortcuts ("Custom Shortcuts"). It is possible
to change, remove or add new custom shortcuts.
The kcm and model communicate directly with the daemon over DBus. This removes
the need to awkwardly construct actions to pass to the KGlobalAccel API.

BUG: 157468
BUG: 213101
BUG: 230583
BUG: 250121
BUG: 251437
BUG: 272554
BUG: 318964
BUG: 341817
BUG: 348264
BUG: 366257
BUG: 369020
BUG: 388574
BUG: 393403
BUG: 408942
BUG: 416149
BUG: 416737
BUG: 417915
BUG: 419215
BUG: 419515
BUG: 419624
BUG: 419692
BUG: 419825
BUG: 419909
BUG: 420093
FIXED-IN: 5.19.0

Closes T7267

Test Plan:
kcmshell5 kcm_keys

Reviewers: VDG, Plasma, ngraham

Reviewed By: VDG, ngraham

Subscribers: GB_2, broulik, davidedmundson, nicolasfella, ngraham, iasensio, plasma-devel

Tags: Plasma

Maniphest Tasks: T7267

Differential Revision:


davidreApr 30 2020, 4:51 PM
Differential Revision
D28744: Rewrite of the global shortcuts kcm
R119:fdfb48786ed5: Merge branch 'Plasma/5.18'
T7267: Global Shortcuts