Improve mime type filters in QFileDialog
This patch improves the handling of mime type filters in QFileDialog.
The main change is in selectMimeTypeFilter(), which was just falling back
unconditionally on selectNameFilter(). Instead, mime type filters should
have an higher priority than name filters.
This patch also adds a new selectedMimeTypeFilter() method, which is used in the unit test.
Change-Id: Ice8bb08f5ff46e4a942d539f6001424eca878f74
Reviewed-by:
David Faure <david.faure@kdab.com>
Showing
- src/gui/kernel/qplatformdialoghelper.cpp 21 additions, 0 deletionssrc/gui/kernel/qplatformdialoghelper.cpp
- src/gui/kernel/qplatformdialoghelper.h 5 additions, 0 deletionssrc/gui/kernel/qplatformdialoghelper.h
- src/widgets/dialogs/qfiledialog.cpp 26 additions, 3 deletionssrc/widgets/dialogs/qfiledialog.cpp
- src/widgets/dialogs/qfiledialog.h 1 addition, 0 deletionssrc/widgets/dialogs/qfiledialog.h
- src/widgets/dialogs/qfiledialog_p.h 16 additions, 0 deletionssrc/widgets/dialogs/qfiledialog_p.h
- tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp 30 additions, 0 deletionstests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
Please register or sign in to comment