forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -147,17 +147,16 @@ bool GlslEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
|
|||||||
|
|
||||||
errorMessage->clear();
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlslEditorPlugin::extensionsInitialized()
|
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()
|
ExtensionSystem::IPlugin::ShutdownFlag GlslEditorPlugin::aboutToShutdown()
|
||||||
|
Reference in New Issue
Block a user