Bug 494031

Summary: Klipper: editing history is broken for the first item in 6.2 Beta
Product: [Plasma] plasmashell Reporter: Kenneth Raplee <kenrap>
Component: ClipboardAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: asturm, nate, noahadvs, qydwhotmail
Priority: VHI Keywords: regression
Version: 6.1.90   
Target Milestone: 1.0   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 6.2.1
Sentry Crash Report:

Description Kenneth Raplee 2024-10-03 11:22:20 UTC
SUMMARY
Editing text in the clipboard history from Klipper does not actually update it even if Klipper reflects the edit being updated in the history pop-up. When pasting from the clipboard, it still uses the original copied text despite what Klipper shows.

STEPS TO REPRODUCE
1. Have or copy some text to the clipboard history to work with in Klipper.
2. Click the edit contents button on the copied text from history pop-up.
3. Make some changes and hit save.
4. Paste the text anywhere, in a browser, terminal, kate, etc.

OBSERVED RESULT
Example scenario: Copy the text "KDE Plasma" to clipboard. Then edit it to "KDE" in Klipper. Paste text and see it still show "KDE Plasma" again.

EXPECTED RESULT
Have the clipboard paste as "KDE" instead.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Comment 1 Nate Graham 2024-10-03 18:06:59 UTC
Can reproduce. In fact, after editing the top entry, Ctrl+V fails to paste anything for me. If I click the top entry again, it'll paste the old text.

I can only get the new text to paste if I first click on a different entry (to make it the top item), and then click on the desired entry again.
Comment 2 Bug Janitor Service 2024-10-04 02:24:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4785
Comment 3 Fushan Wen 2024-10-04 04:25:57 UTC
Git commit 35367681c1e6ec515bd31a3f3caee0ea48de1710 by Fushan Wen.
Committed on 04/10/2024 at 02:13.
Pushed by fusionfuture into branch 'master'.

klipper: fix editing history for the first item

Editing the first item will not trigger the rowsMoved signal, so we
still need to listen to the dataChanged signal to update clipboard.
FIXED-IN: 6.2.1

M  +1    -1    appiumtests/applets/clipboardtest.py
M  +3    -0    klipper/historymodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/35367681c1e6ec515bd31a3f3caee0ea48de1710
Comment 4 Fushan Wen 2024-10-04 04:47:41 UTC
Git commit 5319e8edfed25fb0a42cfee188745bb4f650a4b4 by Fushan Wen.
Committed on 04/10/2024 at 04:26.
Pushed by fusionfuture into branch 'Plasma/6.2'.

klipper: fix editing history for the first item

Editing the first item will not trigger the rowsMoved signal, so we
still need to listen to the dataChanged signal to update clipboard.
FIXED-IN: 6.2.1


(cherry picked from commit 35367681c1e6ec515bd31a3f3caee0ea48de1710)

Co-authored-by: Fushan Wen <qydwhotmail@gmail.com>

M  +1    -1    appiumtests/applets/clipboardtest.py
M  +3    -0    klipper/historymodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/5319e8edfed25fb0a42cfee188745bb4f650a4b4