Don't ignore initially selected mime type filter
ClosedPublic

Authored by elvisangelaccio on May 24 2017, 9:27 AM.

Details

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.

Diff Detail

Repository
R135 Integration for Qt applications in Plasma
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Plasma. · View Herald TranscriptMay 24 2017, 9:27 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
dfaure accepted this revision.Jun 4 2017, 6:02 PM
This revision is now accepted and ready to land.Jun 4 2017, 6:02 PM
This revision was automatically updated to reflect the committed changes.