Commit 7ccab9b5 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Eike Ziller
Browse files

MimeType: Improve performance for matchesName

aliases() iterates through the entire hash. It should not be called so

Change-Id: I2f896489459b2237a0a1763919fb8a52fb411ae1
Reviewed-by: default avatarEike Ziller <>
parent 73616849
......@@ -432,7 +432,9 @@ QString MimeType::filterString() const
bool MimeType::matchesName(const QString &nameOrAlias) const
return d->name == nameOrAlias || aliases().contains(nameOrAlias);
if (d->name == nameOrAlias)
return true;
return MimeDatabasePrivate::instance()->provider()->resolveAlias(nameOrAlias) == d->name;
void MimeType::setPreferredSuffix(const QString &suffix)
Supports Markdown
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