Skip to content

Resolve service files from applications folder

Méven Car requested to merge meven/kglobalaccel:work/fix-421329 into master

The bug was caused by the fact that KServiceActionComponent expected custom service files to be in ~/.local/share/kglobalaccel, but code responsible for copying the original service file did not create its parent directory in https://invent.kde.org/plasma/plasma-desktop/-/blob/master/kcms/keys/kcm_keys.cpp#L173 and failed to copy silently.

Instead of fixing this, this patch makes this copying unnecessary by looking for service file in the regular applications directory and allow users to more reliably transfer their settings between systems since its shortcut setting won't rely on the ~/.local/ system specific folder. A next step will be to remove this copying code in kcm_keys.

Apps installing their service file to prefix/share/kglobalaccel aren't be affected. https://invent.kde.org/frameworks/kglobalaccel/-/blob/master/src/runtime/globalshortcutsregistry.cpp#L315

Thanks @davidre for helping out on the explanation.

BUG: 421329 FIXED-IN: 5.73

CC @mart @ngraham

Bug was created indirectly by e5fa5cbc and plasma/plasma-desktop@1ee6660c

Edited by Méven Car

Merge request reports