Fix PowerDevil shortcuts migration

Authored by davidedmundson on Feb 20 2018, 12:26 PM.

Description

Fix PowerDevil shortcuts migration

Summary:
5.11 -> 5.12 migrated shortcuts from kded5 to the correct component name
org_kde_powerdevil for good reasons
However, despite a kconfupdate script working correctly and moving the
old keys, kglobalaccel is running whilst we update and it syncs the old
values later. On future loads it detects the duplication and removes the
powerdevil entries.

This patch removes the old powermanagent entries in the kded5 component
at powerdevil startup which is at runtime where we can talk to
kglobalaccel, but before powerdevil has registered the new actions.

This should handle both users that haven't upgraded to 5.12 yet, as well
as users who hit the previous config script.

Ideally kconf_update needs to be patched to do migration at appropriate
times.

BUG: 389991
FIXED-IN: 5.12.2

Test Plan:
"broke" my config by putting in values in the old place with a custom shortcut for poweroff
Restarted kglobalaccel
Ran powerdevil
Shortucts worked
Cleanly quit kglobalaccel
Config stayed synced

Reviewers: Plasma, broulik

Reviewed By: Plasma, broulik

Subscribers: broulik, fvogt, aacid, cfeck, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D10668

Details

Committed
davidedmundsonFeb 20 2018, 12:26 PM
Reviewer
Plasma
Differential Revision
D10668: Fix PowerDevil shortcuts migration
Parents
R122:a7428cd82043: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown