Review Request 115611: KoFileDialogHelper => KoFileDialog refactor

Yue Liu yue.liu at mail.com
Sun Mar 23 00:21:55 GMT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115611/
-----------------------------------------------------------

(Updated March 23, 2014, 12:21 a.m.)


Status
------

This change has been marked as submitted.


Review request for Calligra.


Repository: calligra


Description
-------

When I'm porting Q/KFileDialog thing to KoFileDialogHelper I found there are some design issues so refactored KoFileDialogHelper.

Now it names as KoFileDialog and moved to kowidgets.

Some use cases of file dialog check return value of dialog.exec(), so static methods are abandoned and a getDialog() method is provided to do whatever you want to the QFileDialog object, using static methods also results in parameter list too long.

Some use cases just use name filters instead of mimetype, so filter setter refactored to 3 methods:
setNameFilter(QString), setNameFilters(QStringList), setMimeTypeFilters(QStringList)

Qt 5.2 introduced QFileDialog::setMimeTypeFilters(QStringList) but its not available through static methods, another excuse to abandon static methods.

Added getXXX() methods as convenience for what static methods usually do.


Diffs
-----

  krita/gemini/desktopviewproxy.cpp 489a440 
  krita/plugins/assistants/RulerAssistant/kis_ruler_assistant_tool.cc dc4faa2 
  krita/plugins/extensions/dockers/flipbook/flipbookdocker_dock.cpp ad95ef6 
  krita/plugins/extensions/dockers/lut/lutdocker_dock.cpp bd5a8e3 
  krita/plugins/extensions/imagesplit/imagesplit.cpp 1928893 
  krita/plugins/extensions/separate_channels/kis_channel_separator.cc d6d1769 
  krita/ui/dialogs/kis_dlg_file_layer.cpp ec5aa52 
  krita/ui/dialogs/kis_dlg_preferences.cc c02577f 
  krita/ui/kis_image_manager.cc 8aeddd3 
  krita/ui/kis_node_manager.cpp 25ca964 
  krita/ui/widgets/KisFlipbookSelector.cpp 9384790 
  krita/ui/widgets/kis_color_space_selector.cc 73bde3b 
  libs/main/CMakeLists.txt ac708c8 
  libs/main/KoDocument.cpp 70c838c 
  libs/main/KoFileDialogHelper.h 4afafd4 
  libs/main/KoFileDialogHelper.cpp 2483bc4 
  libs/main/KoMainWindow.cpp 11a7248 
  libs/main/KoOpenPane.cpp bf5b219 
  libs/widgets/CMakeLists.txt 01f015b 
  libs/widgets/KoEditColorSetDialog.cpp bf4eabe 
  libs/widgets/KoFileDialog.h PRE-CREATION 
  libs/widgets/KoFileDialog.cpp PRE-CREATION 
  sheets/dialogs/CSVDialog.cpp 4e9d7ed 

Diff: https://git.reviewboard.kde.org/r/115611/diff/


Testing
-------

Works on OSX.

But I remember the reason static methods are used is related to some kfiledialog-related bugs on Windows, please test whether KFileDialog is still used when setting UseNativeDialog=true in kdeglobals on Windows.


Thanks,

Yue Liu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20140323/a9b5258e/attachment.htm>


More information about the calligra-devel mailing list