summaryrefslogtreecommitdiff
path: root/src/widgets/dialogs/qfiledialog.h
diff options
context:
space:
mode:
authorElvis Angelaccio <elvis.angelaccio@kde.org>2016-09-05 12:32:35 +0200
committerDavid Faure <david.faure@kdab.com>2017-01-06 16:27:41 +0000
commit34f82b8abcb279542b6350e70609c549e39caafb (patch)
treead66121fcdd09f6e1278e1142f9e17a264863373 /src/widgets/dialogs/qfiledialog.h
parentbc80cef1d4bb07605cba81de082625f07fc4136b (diff)
downloadqtbase-34f82b8abcb279542b6350e70609c549e39caafb.tar.gz
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>
Diffstat (limited to 'src/widgets/dialogs/qfiledialog.h')
-rw-r--r--src/widgets/dialogs/qfiledialog.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h
index c2ab0b3918..7959eebd7b 100644
--- a/src/widgets/dialogs/qfiledialog.h
+++ b/src/widgets/dialogs/qfiledialog.h
@@ -125,6 +125,7 @@ public:
void setNameFilters(const QStringList &filters);
QStringList nameFilters() const;
void selectNameFilter(const QString &filter);
+ QString selectedMimeTypeFilter() const;
QString selectedNameFilter() const;
#ifndef QT_NO_MIMETYPE