Bug 438519 - 'OK' button in the 'Paste clipboard contents' dialog is always enabled, even if the filename field is empty. And a confusing "File already exists" dialog appears if I click on it.
Summary: 'OK' button in the 'Paste clipboard contents' dialog is always enabled, even ...
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.105.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
: 440488 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-12 18:53 UTC by Patrick Silva
Modified: 2024-02-29 14:17 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-06-12 18:53:40 UTC
STEPS TO REPRODUCE
1. copy text
2. open Dolphin
3. press ctrl+v

OBSERVED RESULT
A window to create a file with pasted contents shows up.
"OK" button is active despite file name field is empty,
"File already exists" dialog appears when I click on it.

EXPECTED RESULT
keep "OK" greyed out until th user starts to type a file name.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: Plasma 5.22
KDE Frameworks Version: 5.82
Qt Version: Qt 5.15.2
Comment 1 Nate Graham 2021-06-15 23:17:07 UTC
Can confirm.
Comment 2 Nate Graham 2021-06-15 23:53:49 UTC
The  bug is clearly that the OK button in the QDialogButtonBox isn't disabled by default and its enablement connected to the length of the text field being > 0, and it's also clearly somewhere in paste.cpp, pastedialog.cpp, or pastejob.cpp, but none of my changes seem to be taking effect and I'm giving up for now.
Comment 3 Ahmad Samir 2021-06-18 21:15:49 UTC
It looks like this is using QInputDialog::getText() in the getNewFileName() method in paste.cpp, probably should be switched to use PasteDialog.
Comment 4 Patrick Silva 2021-08-04 22:05:52 UTC
*** Bug 440488 has been marked as a duplicate of this bug. ***
Comment 5 Patrick Silva 2021-08-23 22:23:35 UTC
The same happens with "OK" button of the dialog to create a tag (context menu > Assign tags > Create).
Comment 6 Patrick Silva 2024-02-29 14:17:22 UTC
It's still reproducible on Plasma 6.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphics Platform: Wayland