serious kfiledialog bug

Rafael Fernández López ereslibre at
Sat Dec 6 02:41:57 GMT 2008


I can undestand now bug #176657. The attached patch fixes the problem.

Basically what's going on is that KDirOperator doesn't know the context. It 
will emit that the file has been selected without knowing whether you are 
saving or loading.

This means that you always load or save with one or two clicks. You cannot 
load with one click, and save with two. KDirOperator doesn't get that far (at 
least until now).

At the same time KFileWidget only receives from KDirOperator the fileSelected() 
signal, without the context of what happened: one or two clicks on it (it 
could filter by using operationMode attribute...).

Basically there are two approaches of fixing this:

- We can give context to KDirOperator, so it will emit fileSelected if we click 
on a dir, or we click on a file when loading. It will emit fileSelected if we 
double click on a file and we are saving. It will filter the single click on a 
file if we are saving.

- We can add another signal to KDirOperator, so KFileWidget can find out if 
there happened single or double click on the current element.

I have written the first approach. This can be taken as possibly "harm?" for 
other apps that use KDirOperator internally. It shouldn't be a problem since 
the default is "loading", which will emit fileSelected the same times as 

OK to commit ?

Rafael Fernández López.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-kfile.diff
Type: text/x-patch
Size: 6078 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list