Bug 448909

Summary: KLIPPER - Action tests use truncated contents of clipboard
Product: [Plasma] plasmashell Reporter: Leonidas Arvanitis <l.arvanitis>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR Keywords: regression
Version First Reported In: 5.23.5   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.25
Sentry Crash Report:

Description Leonidas Arvanitis 2022-01-21 16:27:15 UTC
SUMMARY
The regex match test for the clipboard actions do not use the full contents of the copied text.


STEPS TO REPRODUCE
1. Create a clipboard action which looks at the end of the text, such as `.*\.mp4`
2. Copy a long text, such as:
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456.mp4

OBSERVED RESULT
Nothing happens!

EXPECTED RESULT
Open actions menu.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

This works (one character less):
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345.mp4

https://bugs.kde.org/show_bug.cgi?id=444365 is a similar report and according to its fix, I think the issue is here https://invent.kde.org/plasma/plasma-workspace/-/blob/Plasma/5.23/klipper/urlgrabber.cpp#L150

Maybe
    QString text(item->text());
should be
    QString text(item->mimeData()->text());
?
Comment 1 Nate Graham 2022-01-23 19:08:30 UTC
Indeed.

Wanna submit a merge request to fix it?
Comment 2 Nate Graham 2022-09-14 20:59:33 UTC
This was fixed in Plasma 5.25.