Skip to content

KFileFilterCombo: Don't add the allTypes option if we only have 1 item

Albert Astals Cid requested to merge work/aacid/no_all_types_if_only_one into master

This can happen when the mime list is something like

("application/x-chm", "application/octet-stream")

so initially m_allTypes will be true because we have 2 types, but then when we process the types we see that one of them is hasAllFilesFilter and not add it to the list (we do it at the end).

Without this patch the list of mimes to chose from looks like

  CHM <-- this is the all types entry
  CHM <-- this is application/x-chm
  All Files <-- this is application/octet-stream

With it we only have

  CHM
  All Files

Merge request reports

Loading