Bug 406932

Summary: Add .kksrc extension to the file name when global shorcuts scheme is exported
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: kcm_keysAssignee: Michael Jansen <kde>
Status: RESOLVED FIXED    
Severity: normal CC: harogaston, nate, plasma-bugs
Priority: NOR Keywords: junior-jobs
Version: 5.18.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.19.0
Sentry Crash Report:

Description Patrick Silva 2019-04-26 20:44:04 UTC
SUMMARY
I exported my global shortcuts scheme via "Global shortcuts" kcm. When I tried to import it to another user account on my system, the file open dialog found no file .kksrc to open.
I took a few minutes to notice that such situation occurred because the file
containing the global shortcuts scheme was previously exported/saved without any extension.
Threrefore, I think would be nice automatically to add .kksrc extension to the file name when the global shortcurts scheme is exported.

Operating System: Arch Linux 
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3
Comment 1 Christoph Feck 2019-05-16 00:25:59 UTC
The source actually tries to set the extension, but maybe in a wrong way. It should be easy to check how it is set elsewhere in KDE code.

https://cgit.kde.org/plasma-desktop.git/tree/kcms/keys/kglobalshortcutseditor.cpp#n526
Comment 2 Gastón Haro 2020-04-04 01:54:53 UTC
Fixed in https://phabricator.kde.org/D28547
Comment 3 Christoph Feck 2020-04-04 08:53:58 UTC
Please only close bugs that have commits landed.
Comment 4 Gastón Haro 2020-04-04 16:44:39 UTC
(In reply to Christoph Feck from comment #3)
> Please only close bugs that have commits landed.

Will do. Sorry.
Comment 5 Nate Graham 2020-04-07 18:26:21 UTC
Git commit 3e8c7dada73ed838a93b0b0ffcd5c679627ffa54 by Nate Graham, on behalf of Gastón Haro.
Committed on 07/04/2020 at 18:26.
Pushed by ngraham into branch 'master'.

Add .kksrc extension to the file name when global shorcuts scheme is exported

Summary:
The "Global shortcuts" (keys) kcm plugin does not add a corresponding
file extension to the explorted schemes, nevertheless the import
dialog filters files by the ".kksrc" extension causing that some users
are not able to find their exported files. This patch addresses that
situation.

Test Plan:
# Open "Global shortcuts" kcm module
# Select File->Export scheme...
# Check some random component(s)
# Click OK
# The save file dialog should have
## "All files" selected as filter
## "global_shortcuts.kksrc" as suggested file name

Reviewers: ngraham, mart

Reviewed By: ngraham, mart

Subscribers: davidre, plasma-devel

Tags: #plasma

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

M  +22   -12   kcms/keys/kglobalshortcutseditor.cpp

https://commits.kde.org/plasma-desktop/3e8c7dada73ed838a93b0b0ffcd5c679627ffa54