Commit 0fbdab69 authored by Eike Ziller's avatar Eike Ziller

MimeDatabase: Avoid empty filter string in allFilterStrings.

Change-Id: I975423d2b0fcde7ff6e625e9d3cdaf271dd57dec
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent a21afdd2
......@@ -323,8 +323,11 @@ QString MimeDatabase::allFiltersString(QString *allFilesFilter)
{
MimeDatabase mdb;
QSet<QString> uniqueFilters;
foreach (const MimeType &mt, mdb.allMimeTypes())
uniqueFilters.insert(mt.filterString());
foreach (const MimeType &mt, mdb.allMimeTypes()) {
const QString &filterString = mt.filterString();
if (!filterString.isEmpty())
uniqueFilters.insert(mt.filterString());
}
QStringList filters;
foreach (const QString &filter, uniqueFilters)
filters.append(filter);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment