KFileDialog::selectedFile's behaviour

Raphael Kubo da Costa kubito at gmail.com
Wed May 27 15:53:30 BST 2009


2009/5/23 Raphael Kubo da Costa <kubito at gmail.com>:
> Hi there,
>
> When using KFileDialog with setMode(KFile::File),
> setOperationMode(KFileDialog::Saving) and passing a default mimetype
> to setMimeFilter, the dialog only returns a filename with extension if
> the name typed in the input box doesn't correspond to an existing
> file.
>
> So if you have foo and bar in your directory and pass
> "application/x-compressed-tar" to setMimeFilter's default parameter,
> entering "foobar" in the file name input box will make selectedFile()
> return "/path/to/foobar.tar.gz", whereas entering "foo" will return
> "/path/to/foo" and completely ignore the default extension passed,
> possibly because foo already exists.
>
> Is this behaviour a feature or a bug? ;)
>
> Thanks,
> Raphael

Hello,

Please don't consider I'm trying to make any kind of pressure here,
but I can start working on a fix if it's indeed a bug.

Thanks,
Raphael




More information about the kde-core-devel mailing list