diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-02-02 15:47:34 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-02-02 16:04:20 +0000 |
commit | ea4ad9524184d5ef231545c05d87b0d5b9cd8585 (patch) | |
tree | c25059383554dda623cd16a7bd54f4fdcacd46c7 /src | |
parent | ba05edc6bb2422a0adc2c49b8b351bf6d0f237c7 (diff) | |
download | qt-creator-ea4ad9524184d5ef231545c05d87b0d5b9cd8585.tar.gz |
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: David Schulz <david.schulz@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/texteditor/generichighlighter/manager.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/texteditor/generichighlighter/manager.cpp b/src/plugins/texteditor/generichighlighter/manager.cpp index d44eec5374..a14260a743 100644 --- a/src/plugins/texteditor/generichighlighter/manager.cpp +++ b/src/plugins/texteditor/generichighlighter/manager.cpp @@ -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(); } |