Bug 377349 - QFileDialog (using KDEs file dialog): open button is enabled even when no file is selected, and does nothing when clicked
Summary: QFileDialog (using KDEs file dialog): open button is enabled even when no fil...
Status: RESOLVED FIXED
Alias: None
Product: plasma-integration
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.9.5
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2017-03-07 19:07 UTC by Frank Schaefer
Modified: 2025-08-05 21:35 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: Frameworks 6.14
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Schaefer 2017-03-07 19:07:10 UTC
Using KDEs native file dialog, the open/save button of QFileDialog::getOpenFileName, getSaveFileName() etc. is enabled even if no file is selected

Steps to reproduce:
e.g. QFileDialog::getOpenFileName(this, "Open", QCoreApplication::applicationDirPath());
=> dialog shows application directory with no file selected, but Open/Save button is enabled.
Comment 1 Frank Schaefer 2017-03-07 19:09:10 UTC
Used Qt version is 5.7.1.
Comment 2 Nate Graham 2020-09-08 14:59:12 UTC
Can you still reproduce this with Plasma 5.19?
Comment 3 Frank Schaefer 2020-09-12 12:38:49 UTC
Yes.
Comment 4 Gabriel Barros 2023-09-27 19:31:22 UTC
isn't this expected behaviour. The current dir is "selected" and will be returned if you press open/save.

i believe you have to pass options such as QFileDialog::AnyFile to force one file selection. I might be wrong.
Comment 5 Nate Graham 2023-09-28 19:00:05 UTC
Well, then there's no file selected, clicking the Open button in the file chooser dialog (as opposed to the folder or file+folder chooser dialog) will do nothing when clicked.

Anyway, can confirm the issue.
Comment 6 Nicolas Fella 2025-08-05 21:35:03 UTC
This seems to be fixed with https://invent.kde.org/frameworks/kio/-/commit/debd9fd15a6fae6d745fa6f3b0e5e812ac163162