summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-04-22 13:42:20 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-04-27 07:03:48 +0000
commitf60780881bdfcdcc705655cdcff3ab93b098866f (patch)
tree322d4ddbe7549816bd6b2afa94b3abffcd28f07c
parentf7656761713d5568c825b96d7ce0ca36f3dcd630 (diff)
downloadqt-creator-f60780881bdfcdcc705655cdcff3ab93b098866f.tar.gz
MimeDatabase: Avoid parsing the mime xml files multiple times
At the moment we need to throw the parsed information away and reparse everything if we add another mime xml file (*), so make sure that we do not use mime information (which triggers a first parse) before we added all mime xml files. (*) we do that because the data for a mime type is distributed through a whole range of classes which do not easily allow to remove an already registered mime type, but we must be able to overwrite mime types from freedesktop.org.xml. Change-Id: I5e532875cc750af1da3e0139397279d7be203c27 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
-rw-r--r--src/plugins/glsleditor/glsleditorplugin.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/glsleditor/glsleditorplugin.cpp b/src/plugins/glsleditor/glsleditorplugin.cpp
index 3695c0ef83..75b4b8d162 100644
--- a/src/plugins/glsleditor/glsleditorplugin.cpp
+++ b/src/plugins/glsleditor/glsleditorplugin.cpp
@@ -147,17 +147,16 @@ bool GlslEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
errorMessage->clear();
- FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE);
- FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_VERT);
- FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_FRAG);
- FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_VERT_ES);
- FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_FRAG_ES);
-
return true;
}
void GlslEditorPlugin::extensionsInitialized()
{
+ FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE);
+ FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_VERT);
+ FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_FRAG);
+ FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_VERT_ES);
+ FileIconProvider::registerIconOverlayForMimeType(":/glsleditor/images/glslfile.png", Constants::GLSL_MIMETYPE_FRAG_ES);
}
ExtensionSystem::IPlugin::ShutdownFlag GlslEditorPlugin::aboutToShutdown()