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.
Used Qt version is 5.7.1.
Can you still reproduce this with Plasma 5.19?
Yes.
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.
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.
This seems to be fixed with https://invent.kde.org/frameworks/kio/-/commit/debd9fd15a6fae6d745fa6f3b0e5e812ac163162