Commit f3f077e1 authored by Antonio Rojas's avatar Antonio Rojas
Browse files

Avoid duplicates in the available backends list

If a generator can open multiple mime types that match the same file, avoid showing a backend chooser dialog with multiple instances of the same

REVIEW: 129791
BUG: 374650
parent bb84cbe0
......@@ -2196,11 +2196,11 @@ KPluginMetaData DocumentPrivate::generatorForMimeType(const QMimeType& type, QWi
foreach (const QString& supported, md.mimeTypes())
QMimeType mimeType = mimeDatabase.mimeTypeForName(supported);
if (mimeType == type) {
if (mimeType == type && !exactMatches.contains(md)) {
exactMatches << md;
if (type.inherits(supported))
if (type.inherits(supported) && !offers.contains(md))
offers << md;
Markdown is supported
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