diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2020-02-14 16:54:02 +0100 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2020-02-16 10:51:33 +0100 |
commit | 2cbd4ba7703756c3b0b5b37b118e755e5ea0bfe6 (patch) | |
tree | dd96b3bc5c4088447aabb1f3363644ce16904df4 /src/core | |
parent | 226fef3dc00874d3c69ac62364518411a95ef4da (diff) |
Fix name filters of GTK file picker
Setting an empty string instead of "()" fixes that case where the file
input doesn't have "accept" attribute.
Task-number: QTBUG-82109
Change-Id: I8a72f819fa6d8bbab4e5f1067b38ad75ff11e118
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/file_picker_controller.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/file_picker_controller.cpp b/src/core/file_picker_controller.cpp index 13e9437d2..62e02e126 100644 --- a/src/core/file_picker_controller.cpp +++ b/src/core/file_picker_controller.cpp @@ -172,6 +172,9 @@ QStringList FilePickerController::nameFilters(const QStringList &acceptedMimeTyp QStringList acceptedGlobs; QMimeDatabase mimeDatabase; + if (acceptedMimeTypes.isEmpty()) + return nameFilters; + for (QString type : acceptedMimeTypes) { if (type.startsWith(".")) { // A single suffix |