Bug 448909 - KLIPPER - Action tests use truncated contents of clipboard
Summary: KLIPPER - Action tests use truncated contents of clipboard
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 5.23.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-01-21 16:27 UTC by Leonidas Arvanitis
Modified: 2022-09-14 20:59 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.