forked from qt-creator/qt-creator
Mimetypes v3: Fix that octet-stream was wrongly considered parent
The fallback mimetype of application/octet-stream is supposed to only be
a fallback if the mimetype doesn't specify another parent.
Amends 98b1e82d2b
Fixes: QTCREATORBUG-27398
Change-Id: I4ac92dd4817fae37de4499fe9e08aa2e5dd50a51
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -356,9 +356,11 @@ QStringList MimeDatabasePrivate::parents(const QString &mimeName)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (result.isEmpty()) {
|
||||
const QString parent = fallbackParent(mimeName);
|
||||
if (!parent.isEmpty())
|
||||
result.append(parent);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user