Review Request: Make KFileDialog update saved file type based on extension also for non-mimetype based filters

David Faure faure at kde.org
Thu Jan 13 16:50:39 GMT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6325/#review9622
-----------------------------------------------------------


The idea is OK. Two comments on the implementation, below.
Also, please note that the kdelibs coding style is "no spaces between (...)". Thanks.


trunk/KDE/kdelibs/kfile/kfilewidget.cpp
<http://svn.reviewboard.kde.org/r/6325/#comment10619>

    If you want a QString that holds a filename, please call it const QString fileName, rather than reuse urlStr to not contain a URL anymore :-)



trunk/KDE/kdelibs/kfile/kfilewidget.cpp
<http://svn.reviewboard.kde.org/r/6325/#comment10618>

    This line could be more generic, using KMimeTypeRepository::matchFileName(fileName, f)
    (that's in a private kdecore header, but the class is exported for kdelibs-internal usage). Then it would support other globs like Makefile.* etc.


- David


On Jan. 11, 2011, 4:51 p.m., Lubos Lunak wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6325/
> -----------------------------------------------------------
> 
> (Updated Jan. 11, 2011, 4:51 p.m.)
> 
> 
> Review request for kdelibs, Rafael Fernández López and David Faure.
> 
> 
> Summary
> -------
> 
> Run e.g. Kolourpaint, do 'Save as', type 'a.xpm' , KFileDialog will automatically select 'XPM' as the saved type. This however doesn't work with all applications, namely those that use KFileDialog::setFilter() (i.e. only setMimeFilter() works this way). This patch implements this feature also for this case.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kfile/kfilefiltercombo.h 1208060 
>   trunk/KDE/kdelibs/kfile/kfilefiltercombo.cpp 1208060 
>   trunk/KDE/kdelibs/kfile/kfilewidget.cpp 1208060 
> 
> Diff: http://svn.reviewboard.kde.org/r/6325/diff
> 
> 
> Testing
> -------
> 
> Tried with LibreOffice with KDE4 integration, where this feature works only with this patch.
> 
> 
> Thanks,
> 
> Lubos
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110113/08a9d817/attachment.htm>


More information about the kde-core-devel mailing list