Review Request: a patch for returning the currentMimeFilter also with native filedialogs

David Faure faure at kde.org
Mon Nov 30 22:49:19 GMT 2009


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

Ship it!


It's a bit ugly, but as I realized after discussing it on IRC, there's no other solution because of the 4 modes this code has to support (static method native, static method non-native, KFileDialog instance native, KFileDialog instance non-native).
So no other way than big internal static methods.


/trunk/KDE/kdelibs/kio/kfile/kfiledialog.cpp
<http://reviewboard.kde.org/r/1730/#comment2692>

    looks like this TODO can be partly simplified now ;)


- David


On 2009-09-28 22:56:07, Patrick Spendrin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1730/
> -----------------------------------------------------------
> 
> (Updated 2009-09-28 22:56:07)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> When opening a file dialog, there is the possibility to use the native (Qt) dialog. When using this option, the return value of currentMimeFilter() does not respect the filter that is returned by the Qt file dialogs. To support this I moved some of the static functions into the private class and added a QString pointer (similar as it is done by QFileDialog::getOpenFileName).
> The bug can be checked in koffice in the export dialog: With native file dialog, switching the document filter will not change the file format you can export to (it will always be the native one).
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kio/kfile/kfiledialog.cpp 1025044 
> 
> Diff: http://reviewboard.kde.org/r/1730/diff
> 
> 
> Testing
> -------
> 
> On Windows of course, please test if the code still works correctly on Linux. To enable the native filedialog simply put 
> [KFileDialog Settings]
> Native=false
> into your kdeglobals (should work on Linux too, but is not really needed).
> 
> 
> Thanks,
> 
> Patrick
> 
>





More information about the kde-core-devel mailing list