D5956: Make sure we always set a default mime filter in save mode

Elvis Angelaccio noreply at phabricator.kde.org
Wed May 24 09:24:15 UTC 2017


elvisangelaccio created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  KFileWidget::setMimeFilter() documentation says a default mime filter
  should be set if the dialog is being open in save mode.
  
  Without a default filter, the dialog uses a custom item (created by
  concatenating all the mime type filters) as default. This is not useful
  because it means an additional click for the user to select a filter that can
  actually be useful.
  
  If the initiallySelectedMimeTypeFilter() is empty, we use the first mime
  filter as fallback.

TEST PLAN
  tests/qfiledialogtest --mimeTypeFilter application/json --mimeTypeFilter application/zip --acceptMode save
  
  New unit test passes.

REPOSITORY
  R135 Integration for Qt applications in Plasma

BRANCH
  defaultFilterSaveMode (branched from Plasma/5.10)

REVISION DETAIL
  https://phabricator.kde.org/D5956

AFFECTED FILES
  autotests/kfiledialog_unittest.cpp
  src/platformtheme/kdeplatformfiledialoghelper.cpp

To: elvisangelaccio, #plasma, dfaure
Cc: plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170524/62dcaa92/attachment.html>


More information about the Plasma-devel mailing list