KFileDialog::selectedFile's behaviour
David Jarvie
djarvie at kde.org
Wed May 27 17:48:24 BST 2009
On Wed, May 27, 2009 3:53 pm, Raphael Kubo da Costa wrote:
> 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.
Having encountered this issue already, I'd say it's a bug.
--
David Jarvie.
KAlarm author & maintainer.
http://www.astrojar.org.uk/kalarm
More information about the kde-core-devel
mailing list