Commit f0323c26 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

Fix duplicate mimetype elimination

parent 99b56887
......@@ -4281,7 +4281,22 @@ QStringList Document::supportedMimeTypes() const
result << md.mimeTypes();
// Remove duplicate mimetypes represented by different names
QMimeDatabase mimeDatabase;
QSet<QMimeType> uniqueMimetypes;
for (const QString &mimeName : result) {
for (const QMimeType &mimeType : uniqueMimetypes) {
// Sorting by mimetype name doesn't make a ton of sense,
// but ensures that the list is ordered the same way every time
d->m_supportedMimeTypes = result;
return result;
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