Version: (using KDE Devel) Installed from: Compiled sources In some special cases, KFileWidget returns not the correct selected file. Steps to reproduce this: * open KWrite * open the file open dialog * click the dropdown arrow in the location combobox * select one item from the dropdown and remember it's name * click open * KWrite open instead of this one the atm open file again 2nd way to reproduce: * do the first 2 steps again * paste a full file name into the input line. (e.g. a filename from the compiler output...) * click open * same happens as above... After some debugging, I think the problem is in the completion of KFileWidget. The completion object does not emit a "match" signal... This is probably because the completion object has not been requested in the cases above.
SVN commit 762724 by uwolfer: Set the lineedit modified when it has been modified by the user. This way pasted paths/files get opened instead of the last selected in the file view (reproducible in KWrite when already one file has been opened). BUG: 155356 M +2 -0 kfilewidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=762724
I reopen the bug, as the problem is rather similar in another case: make sure you have files starting with the same latter in the directory (eg. c1.txt, c2.txt, c3.txt). Assume you want to open c3.txt. In the Location box type "c", you will see all the files starting with "c". At the same time in the filelist area the focus will jump to the first file starting with "c", here "c1.txt". Now select "c3.txt" in the completion box (with the mouse or by going down, but not pressing enter). "c3.txt" is inserted into the location bar (the focus above is still on c1.txt). Click on Open button, and you will see c1.txt is opened instead of c3.txt. If you press Enter instead of clicking on Open, it works. I can't say how many times I attached a wrong file to a mail because of this bug...
The bug is still present in trunk. The file that is opened is not the one you select (and whose name appears in the location box), but the one that is selected in the file view. Or in other words, if you select a filename from the combobox with the mouse, the selection in the file view is not updated.
@András: I think this has been fixed by SVN commit 821242 (at least I cannot reproduce this issue anymore). Before I set this issue to resolved and still might miss something, it would be great if you could confirm the fix :-) Thanks!
Peter, no it is not fixed yet. The wrong file is selected if you use the mouse to select the item from the dropdown combo.
OK, I should have time next week for having a look on this.
*** Bug 163805 has been marked as a duplicate of this bug. ***
SVN commit 824848 by ppenz: fixed issue that the wrong file has been opened when using the combo box of the location bar BUG: 155356 M +10 -0 kfilewidget.cpp M +1 -0 kfilewidget.h WebSVN link: http://websvn.kde.org/?view=rev&revision=824848