forked from qt-creator/qt-creator
Core: remove unneeded template of mimeTypeFactoryLookup
Change-Id: I2ca6defe1054b0ac06aa134c099a77f253d61a02 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -16,15 +16,14 @@ namespace Core {
|
|||||||
|
|
||||||
/* Find the one best matching the mimetype passed in.
|
/* Find the one best matching the mimetype passed in.
|
||||||
* Recurse over the parent classes of the mimetype to find them. */
|
* Recurse over the parent classes of the mimetype to find them. */
|
||||||
template<class EditorTypeLike>
|
|
||||||
static void mimeTypeFactoryLookup(const Utils::MimeType &mimeType,
|
static void mimeTypeFactoryLookup(const Utils::MimeType &mimeType,
|
||||||
const QList<EditorTypeLike *> &allFactories,
|
const QList<IEditorFactory *> &allFactories,
|
||||||
QList<EditorTypeLike *> *list)
|
QList<IEditorFactory *> *list)
|
||||||
{
|
{
|
||||||
QSet<EditorTypeLike *> matches;
|
QSet<IEditorFactory *> matches;
|
||||||
Utils::visitMimeParents(mimeType, [&](const Utils::MimeType &mt) -> bool {
|
Utils::visitMimeParents(mimeType, [&](const Utils::MimeType &mt) -> bool {
|
||||||
// check for matching factories
|
// check for matching factories
|
||||||
for (EditorTypeLike *factory : allFactories) {
|
for (IEditorFactory *factory : allFactories) {
|
||||||
if (!matches.contains(factory)) {
|
if (!matches.contains(factory)) {
|
||||||
const QStringList mimeTypes = factory->mimeTypes();
|
const QStringList mimeTypes = factory->mimeTypes();
|
||||||
for (const QString &mimeName : mimeTypes) {
|
for (const QString &mimeName : mimeTypes) {
|
||||||
|
Reference in New Issue
Block a user