Commit ea4ad952 authored by Eike Ziller's avatar Eike Ziller

Plain text editor: Do not register for all kinds of mime types

The default mime type 'text/plain' is perfectly enough, since the mime
types that the generic highlighting files might be interested in must be
children of 'text/plain' anyhow.

Change-Id: I9fdaf67676ccb3d511d8ae4e514ab438c8e1e8a5
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent ba05edc6
......@@ -363,13 +363,8 @@ void Manager::registerMimeTypesFinished()
const QPair<RegisterData, QList<MimeType> > &result = m_registeringWatcher.result();
m_register = result.first;
PlainTextEditorFactory *factory = PlainTextEditorFactory::instance();
const QSet<QString> &inFactory = factory->mimeTypes().toSet();
foreach (const MimeType &mimeType, result.second) {
foreach (const MimeType &mimeType, result.second)
MimeDatabase::addMimeType(mimeType);
if (!inFactory.contains(mimeType.type()))
factory->addMimeType(mimeType.type());
}
emit mimeTypesRegistered();
}
......
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