Bug 427188 - Importing shortcut scheme does not do anything
Summary: Importing shortcut scheme does not do anything
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (show other bugs)
Version: 5.19.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords:
: 427359 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-09-30 23:51 UTC by Unknown
Modified: 2020-10-05 15:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20


Attachments
logs of running `systemsettings5` (13.64 KB, text/plain)
2020-10-02 00:55 UTC, Unknown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2020-09-30 23:51:29 UTC
SUMMARY
Importing shortcut schemes does not work

STEPS TO REPRODUCE
1. Export a shortcut scheme
2. Modify it to add a key
3. Reimport it

OR

1. Export shortcut scheme
2. Delete the shortcut category
3. Import it

OBSERVED RESULT
No shortcuts are updated / the category is not reimported.

EXPECTED RESULT
Importing a shortcut scheme should override any existing shortcuts and should readd the category.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.90
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.8.12-arch1-1
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-6500 CPU @ 3.20GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530

ADDITIONAL INFORMATION
I see `Oct 01 09:47:09 desktop systemsettings5[5518]: org.kde.kcm_keys: Ignoring unknown component "kwin"` in journalctl, nothing much else.
Comment 1 David Redondo 2020-10-01 08:52:50 UTC
The reason the kcm ignores an unknown category is that it would have no effect. If the backend doesn't know the category, no shortcut will work and displaying them make sense
Comment 2 David Redondo 2020-10-01 08:56:56 UTC
However your first example should work. Can you post more detailed steps/or if there are messages in the log for that?
Comment 3 Unknown 2020-10-02 00:55:46 UTC
Created attachment 132062 [details]
logs of running `systemsettings5`

I've attached the logs from export > edit > reimport. It ends with the same final error message as the other one:

`org.kde.kcm_keys: Ignoring unknown component "kwin"`
Comment 4 David Redondo 2020-10-02 06:45:13 UTC
I will investigate
Comment 5 Patrick Silva 2020-10-05 11:42:39 UTC
*** Bug 427359 has been marked as a duplicate of this bug. ***
Comment 6 toluschr 2020-10-05 12:37:24 UTC
Changing kwin to KWin manually lets me import the scheme.
Comment 7 David Redondo 2020-10-05 13:55:19 UTC
Git commit 0767688c0d5f4cb1e7df9a03fd80b6f18a1e031c by David Redondo.
Committed on 05/10/2020 at 13:54.
Pushed by davidre into branch 'master'.

Compare against coponent id when importing

We export the id not the displayName

M  +1    -1    kcms/keys/globalaccelmodel.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/0767688c0d5f4cb1e7df9a03fd80b6f18a1e031c
Comment 8 David Redondo 2020-10-05 13:56:48 UTC
Git commit 32f4472a37c4efded4e505a7d8737a93634a3a36 by David Redondo.
Committed on 05/10/2020 at 13:56.
Pushed by davidre into branch 'Plasma/5.20'.

Compare against coponent id when importing

We export the id not the displayName

(cherry picked from commit 0767688c0d5f4cb1e7df9a03fd80b6f18a1e031c)

M  +1    -1    kcms/keys/globalaccelmodel.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/32f4472a37c4efded4e505a7d8737a93634a3a36