Created attachment 160573 [details] Screenshot SUMMARY kdialog --getexistingdirectory shows a regular file dialog instead of a folder dialog. And it's hard to use if a single click is configured to open a file/folder, since clicking a folder opens it inside the dialog rather than selecting it, and Open doesn't work if no folder is selected. STEPS TO REPRODUCE 1. kdialog --getexistingdirectory 2. Click a folder. 3. Click Open. OBSERVED RESULT 1. The sort of dialog used to select a regular file. 2. The folder is opened. 3. Nothing. EXPECTED RESULT 1. A folder selection dialog. 2. The folder is selected. 3. The dialog returns the selected folder. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20230724 KDE Plasma Version: 5.27.6 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.10 Kernel Version: 6.4.3-1-default (64-bit) Graphics Platform: X11 ADDITIONAL INFORMATION Just like Bug 419874, except that affected more (all?) applications. This time, I've only seen it in kdialog; the usual folder selection dialog is used both by KDE applications and Firefox.
The change from directory selector dialog to a file selector dialog was done in this commit: https://invent.kde.org/utilities/kdialog/-/commit/633667a373a690e636c6d7c231c0d9700f62473b The commit comment doesn't really explain the reason for the change - as far as I can tell, KDirSelectDialog is still a thing that exists. There are two issues here: 1. the change of UI to something that is arguably less appropriate. 2. If the user wants to accept the default - there's no longer an easy way to do that.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kdialog/-/merge_requests/29
It looks like KDirSelectDialog was in KDELibs4Support.
(In reply to Grósz Dániel from comment #3) > It looks like KDirSelectDialog was in KDELibs4Support. It is available in plasma-integration - which is installed on my system, but it doesn't have a `dev` package (in Neon), so I don't know how to get the development files.
Correction: the problem wasn't where I pointed at, but in https://invent.kde.org/utilities/kdialog/-/merge_requests/17, which the new MR fixes.
Update on the MR: it got two reviews and an approval. Now just waiting for someone to click the "Merge" button.
Git commit 7b20cb0450bb00bb555a44349d914e88cc633a41 by Albert Astals Cid, on behalf of Oded Arbel. Committed on 05/09/2023 at 22:37. Pushed by aacid into branch 'master'. Fixes bug 472715: use Qt directory selector to select an existing directory Unlike what I said in the connected bug report, the problem was not in the removal of KDirSelectDialog but in the incorrect addition of `setFileMode()`. I went a bit back and forth on the minimal fix (I should have tested more), and I apologize for the noise. Hopefully you can accept this minimal change quickly. M +1 -1 src/kdialog.cpp https://invent.kde.org/utilities/kdialog/-/commit/7b20cb0450bb00bb555a44349d914e88cc633a41