Review Request: make KFileWidget keep current extension if possible

Martin Koller kollix at
Sat Oct 29 12:32:38 BST 2011

This is an automatically generated e-mail. To reply, visit:

Review request for kdelibs.


In trying to fix mentioned bug, I found out the original problem lies in KFileWidget:
If I'm editing a JPEG file which has the non-mainExtension ".jpg" and KFileWidget was told to auto-select an extension,
then it did not check if the already given extension is one which is also allowed and simply removed
".jpg" and added ".jpeg", which is not what a user would expect.

This patch now checks the current extension against all allowed extensions and if there's a match, it
keeps the current extension. Only otherwise will it add the default extension.

This addresses bug 229547.


  kfile/kfilewidget.cpp 09b86d4 



Used kolourpaint with "name.jpg", "name.jpeg", "name.", "name", "name.tif", "name.tiff"


Martin Koller

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list