Made "All Files" filter always available

Needed to be able to open text files with arbitrary or no extension.
Previously, the "All Files" filter would disappear when there was no
plugin with an empty filter string, like the BinEditor plugin.

Reviewed-by: con
This commit is contained in:
Thorbjørn Lindeijer
2010-01-13 17:11:20 +01:00
parent 87a7ed94a3
commit c47f1e3a7f
2 changed files with 23 additions and 28 deletions

View File

@@ -1086,8 +1086,11 @@ QStringList MimeDatabasePrivate::filterStrings() const
{
QStringList rc;
const TypeMimeTypeMap::const_iterator cend = m_typeMimeTypeMap.constEnd();
for (TypeMimeTypeMap::const_iterator it = m_typeMimeTypeMap.constBegin(); it != cend; ++it)
rc += it.value().type.filterString();
for (TypeMimeTypeMap::const_iterator it = m_typeMimeTypeMap.constBegin(); it != cend; ++it) {
const QString filterString = it.value().type.filterString();
if (!filterString.isEmpty())
rc += filterString;
}
return rc;
}