path: root/src/corelib/mimetypes
diff options
authorDavid Faure <>2018-02-27 15:48:07 +0100
committerDavid Faure <>2018-02-28 22:17:58 +0000
commitf2eb7b0204bfd6474fb755d225d47dd2597af35a (patch)
treef94ac63d9eb4abc5819fd251341f3c365a029b42 /src/corelib/mimetypes
parent592b0a37f5daa236f8848608350328230f491e16 (diff)
QMimeDatabase: fix regression in alias resolving
The refactoring to support multiple providers broke alias resolving (e.g. "text/directory" would be an invalid mimetype, instead of being resolved to "text/vcard"). The unittest didn't catch it because most of it was running with a single mime directory (and therefore a single provider, in the new model). Fixed by re-running a number of test methods once we have a second mime directory. Change-Id: Ib5da89ba79c11ed41813b2aff4bc71c30afcde7d Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src/corelib/mimetypes')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
index ec0a6bf0ef..90a16886a9 100644
--- a/src/corelib/mimetypes/qmimeprovider.cpp
+++ b/src/corelib/mimetypes/qmimeprovider.cpp
@@ -401,7 +401,7 @@ QString QMimeBinaryProvider::resolveAlias(const QString &name)
return QLatin1String(mimeType);
- return name;
+ return QString();
void QMimeBinaryProvider::addAliases(const QString &name, QStringList &result)
@@ -729,7 +729,7 @@ void QMimeXMLProvider::addAliases(const QString &name, QStringList &result)
QString QMimeXMLProvider::resolveAlias(const QString &name)
- return m_aliases.value(name, name);
+ return m_aliases.value(name);
void QMimeXMLProvider::addAlias(const QString &alias, const QString &name)