Version: (using Devel) OS: Linux Installed from: Compiled sources Use Tree view or Detailed tree view in the open/save dialogs. In some applications (including Okular, KolourPaint, KWord) if you open a directory in the tree (by the + sign, so that the content of the parent directory remains there), and click on a file in the subdirectory with any mouse button, when you press the button, the dialog goes to the subdirectory which contains the file, and the file is not selected. So you have to click again to select it. In some apps (incl. KWrite and Kate) the open dialog works as expected (does not change the actual directory, inserts relative path to the selected file in the Name line), but the described strange behavior still occurs in the save dialog.
Here using: Qt: 4.5.1 (qt-copy 971295) KDE: 4.2.92 (KDE 4.2.92 (KDE 4.3 >= 20090617)) kdelibs svn rev. 984425 / kdebase svn rev. 984427 on ArchLinux i686 - Kernel 2.6.29.4 I can confirm the described behaviour in the save dialog of KWrite.
Indeed, it seems the treeView case wasn't properly considered: "void KFileWidgetPrivate::setLocationText(const KUrl& url)" with a non-dir url sets the directory if that url contains it. So when you click an item inside an expanded folder in the treeview, setLocationText("dir/file") is called, and the file part is stripped. Also, void KDirOperator::setUrl(const KUrl& _newurl, bool clearforward) does this. Someone with more knowledge about this could fix it
An additional observation: it seems to me that the problem occurs in the file dialogs where only one file can be selected and not when several files can be selected.
Hi, kdelibs (version 4 and earlier) is no longer maintained since a few years. KDE Frameworks 5 or 6 might already have resolved this bug. If not, please re-open against the matching framework if feasible or against the application that shows the issue. We then can still dispatch it to the right Bugzilla product or component. Greetings Christoph Cullmann