QMimeDatabasePrivate: Match shared-mime-info behavior better

* Take into account alias when resolving inheritance

FAIL!  : tst_QMimeDatabase::findByFile(sqlite3.kexi) Compared values are not the same
   Actual   (resultMimeTypeName.toLower()): "application/vnd.sqlite3"
   Expected (mimeTypeName.toLower())      : "application/x-kexiproject-sqlite3"
   Loc: [/home/tsdgeos/qt/qtbase_dev/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/../tst_qmimedatabase.cpp(841)]

Change-Id: Ie5b095669979efef0b1de4175723190ea1f4d5a0
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Albert Astals Cid 2018-10-12 11:11:37 +02:00
parent 2569a5136e
commit e8e8fb5154

View File

@ -422,7 +422,7 @@ bool QMimeDatabasePrivate::inherits(const QString &mime, const QString &parent)
toCheck.pop();
const auto parentList = parents(mimeName);
for (const QString &par : parentList)
toCheck.push(par);
toCheck.push(resolveAlias(par));
}
return false;
}