Bug 492006 - KIO's paste dialog shouldn't offer custom KDE mimetypes that are only used as hints
Summary: KIO's paste dialog shouldn't offer custom KDE mimetypes that are only used as...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords: regression
: 470131 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-21 21:26 UTC by TraceyC
Modified: 2024-08-27 22:17 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TraceyC 2024-08-21 21:26:03 UTC
SUMMARY
Split from bug 491961
When Spectacle is set to auto copy an image, and a screenshot other than rectangular area is taken, it cannot be pasted in in Dolphin without manually picking its filetype

Per 491961, this has 3 different contributing factors requiring 3 different reports.
1. Klipper doesn't preserve "application/x-kde-suggestedfilename". Bug 491961
2. Klipper puts "application/x-kde-onlyReplaceEmpty" first when it should be near the end of the mimetype list. Bug 492005
3. KIO's paste dialog shouldn't offer custom KDE mimetypes that are only used as hints.

STEPS TO REPRODUCE
- Open Dolphin

Spectacle Settings:
- When launching, do not take screenshot automatically
- After taking screenshot, copy image to clipboard

1. Copy an image from spectacle, use any type of screenshot except Rectangular Region
2. Attempt to paste the image into Dolphin with Ctrl V
3. Enter a name at the prompt (Note: when the content is properly pasted, the name is auto suggested like with saving to file ex Screenshot_date-time.ico)

OBSERVED RESULT
The name field is blank
The Data type is "application/x-kde-onlyReplaceEmpty"
Nothing is pasted to the folder in Dolphin

EXPECTED RESULT
The name is pre-populated in keeping with the default name settings in Spectacle's settings
The Data type matches the image format (png, tiff, jpg etc)
The image is pasted as a file in the folder in Dolphin

SOFTWARE/OS VERSIONS
KDE Plasma git-master on Solus

ADDITIONAL INFORMATION
Clicking the Copy button in Spectacle allows the image to be pasted in Dolphin as normal

Discovered when testing !391
https://invent.kde.org/graphics/spectacle/-/merge_requests/391

The bug is not present in 24.05.2
Comment 1 TraceyC 2024-08-22 16:17:59 UTC
*** Bug 470131 has been marked as a duplicate of this bug. ***
Comment 2 TraceyC 2024-08-22 16:20:18 UTC
Just noting, I found that if you have Spectacle set to auto save screenshots to a file, the bug cannot be reproduced
With that setting unchecked, the bug happens.
Comment 3 Bug Janitor Service 2024-08-22 17:17:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1698
Comment 4 Noah Davis 2024-08-27 22:17:50 UTC
Git commit 5bdbf3f3145e10a4a555dafe488e29eb95707f41 by Noah Davis.
Committed on 27/08/2024 at 22:17.
Pushed by ndavis into branch 'master'.

Ignore application/x-kde-onlyReplaceEmpty in paste dialog

M  +3    -0    src/widgets/paste.cpp

https://invent.kde.org/frameworks/kio/-/commit/5bdbf3f3145e10a4a555dafe488e29eb95707f41