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
Branch
initiallySelectedMime (branched from Plasma/5.10)
Lint
No Linters Available
Unit
No Unit Test Coverage
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.