Bug 428099

Summary: Select All does not set the selection for middle-button pasting
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: Jonathan Marten <jjm>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jonathan Marten 2020-10-22 11:31:17 UTC
SUMMARY

Normally, when text is selected within any application by any means, it is immediately made available for middle-button pasting.  In Kate or KWrite this happens when the selection is made by mouse clicking or dragging, or by Shift-movement keyboard selection.  However, it does not happen if Select All is used, either from the menu or Ctrl-A keyboard shortcut.

STEPS TO REPRODUCE
1. Open a text file in Kate or KWrite.
2. Select all the text with Ctrl-A.
3. Either look at Klipper's clipboard history, or middle-button paste in another window.
4. Copy the text using Ctrl-C.
5. Again look at Klipper's clipboard history, or middle-button paste in another window.

OBSERVED RESULT

In step 3, the selected text is not pasted or seen in Klipper's history.  The previous selection is pasted.

In step 5, the selected text can be pasted and is seen.

EXPECTED RESULT

Selecting all the text with Ctrl-A should make it immediately available for middle-button paste.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Git master
KDE Plasma Version: 20.11.70
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Comment 1 Bug Janitor Service 2022-01-12 16:53:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/250
Comment 2 Waqar Ahmed 2022-01-13 19:23:29 UTC
Git commit 089421b23db128f3813fad2dd5393ade0524c483 by Waqar Ahmed.
Committed on 12/01/2022 at 16:49.
Pushed by cullmann into branch 'master'.

set QClipboard::Selection for select all

M  +5    -1    src/view/kateview.cpp

https://invent.kde.org/frameworks/ktexteditor/commit/089421b23db128f3813fad2dd5393ade0524c483