Bug 475097 - Clipboard shortcut changes still applied after cancelling configuration
Summary: Clipboard shortcut changes still applied after cancelling configuration
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (other bugs)
Version First Reported In: 5.27.8
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-01 13:52 UTC by Nicolas Fella
Modified: 2023-10-25 22:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2023-10-01 13:52:44 UTC
STEPS TO REPRODUCE
1. In the clipboard applet, go "Configure Clipboard"
2. Go to "Shortcuts"
3. Change any shortcut setting
4. Click cancel
5. Open settings again

OBSERVED RESULT
The change was applied

EXPECTED RESULT
The change was discarded

SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 6.6
Comment 1 Nicolas Fella 2023-10-01 14:45:45 UTC
Also happens on 5.27
Comment 2 Nicolas Fella 2023-10-01 15:33:42 UTC Comment hidden (spam)
Comment 3 Bug Janitor Service 2023-10-21 00:22:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/200
Comment 4 Christoph Cullmann 2023-10-24 19:34:32 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 475095, bug 475083

M  +5    -1    src/kshortcutseditor.cpp

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