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

REVISION SUMMARY
  Otherwise QFileDialog::selectMimeTypeFilter() has no effect
  if called before show()/initializeDialog() (because the mime
  filters are set only in initializeDialog()).
  
  We also need to ignore the initiallySelectedNameFilter() (which is
  implicitly set) if we have an initiallySelectedMimeTypeFilter().

TEST PLAN
  tests/qfiledialogtest --mimeTypeFilter application/json --mimeTypeFilter 
application/zip --selectMimeTypeFilter application/zip
  
  Moved the show() call in the existing unit test, now it passes.

REPOSITORY
  R135 Integration for Qt applications in Plasma

BRANCH
  initiallySelectedMime (branched from Plasma/5.10)

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

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

To: elvisangelaccio, #plasma, dfaure
Cc: plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart, lukas

Reply via email to