Skip to content

Commit

Permalink
QMimeDatabasePrivate: Match shared-mime-info behavior better
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
albert-astals-cid-kdab committed Nov 13, 2018
1 parent 2569a51 commit e8e8fb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/mimetypes/qmimedatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e8e8fb5

Please sign in to comment.