mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +00:00
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 backend REVIEW: 129791 BUG: 374650
This commit is contained in:
parent
61fdea2c1f
commit
84c9910da9
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue