Bug 475095

Summary: Shortcut settings change still applied after discarding settings
Product: [Unmaintained] wacomtablet Reporter: Nicolas Fella <nicolas.fella>
Component: generalAssignee: Valerii Malov <jazzvoid>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicolas Fella 2023-10-01 13:46:09 UTC
STEPS TO REPRODUCE
1. Open tablet KCM in systemsettings
2. Change any of the shortcut settings
3. Close systemsettings
4. Discard pending settings
5. Open KCM again

OBSERVED RESULT
The change was applied

EXPECTED RESULT
The change was discarded

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110
Qt Version: 5.15
Comment 1 Bug Janitor Service 2023-10-21 00:22:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/200
Comment 2 Christoph Cullmann 2023-10-24 19:34:24 UTC
Git commit b7365dfc6e7418b4214d671b27c0f8a67bc07021 by Christoph Cullmann, on behalf of Nicolas Fella.
Committed on 24/10/2023 at 21:26.
Pushed by cullmann into branch 'master'.

[kshortcuteditor] Undo pending changes on destruction

Currently one has to manually call undo() to discard pending changes when being done with the widget.

This is error-prone because it's easy to forget or cause use-after-free issues when calling undo() on an already deleted editor.

Instead automatically undo() on destruction
Related: bug 475097, bug 475083

M  +5    -1    src/kshortcutseditor.cpp

https://invent.kde.org/frameworks/kxmlgui/-/commit/b7365dfc6e7418b4214d671b27c0f8a67bc07021