diff options
Diffstat (limited to 'src/plugins/glsleditor')
-rw-r--r-- | src/plugins/glsleditor/GLSLEditor.json.in | 47 | ||||
-rw-r--r-- | src/plugins/glsleditor/GLSLEditor.mimetypes.xml | 42 | ||||
-rw-r--r-- | src/plugins/glsleditor/glsleditor.qrc | 1 | ||||
-rw-r--r-- | src/plugins/glsleditor/glsleditorplugin.cpp | 3 |
4 files changed, 46 insertions, 47 deletions
diff --git a/src/plugins/glsleditor/GLSLEditor.json.in b/src/plugins/glsleditor/GLSLEditor.json.in index 3e5ff3831c7..915ae7ae029 100644 --- a/src/plugins/glsleditor/GLSLEditor.json.in +++ b/src/plugins/glsleditor/GLSLEditor.json.in @@ -15,5 +15,50 @@ \"Category\" : \"Other Languages\", \"Description\" : \"Editor for GLSL.\", \"Url\" : \"http://www.qt.io\", - $$dependencyList + $$dependencyList, + + \"Mimetypes\" : \" + <?xml version=\'1.0\'?> + <mime-info xmlns=\'http://www.freedesktop.org/standards/shared-mime-info\'> + + <mime-type type=\'application/x-glsl\'> + <alias type=\'text/x-glsl\'/> + <sub-class-of type=\'text/plain\'/> + <comment>GLSL Shader file</comment> + <glob pattern=\'*.glsl\'/> + <glob pattern=\'*.shader\'/> + </mime-type> + + <mime-type type=\'text/x-glsl-frag\'> + <sub-class-of type=\'text/x-glsl\'/> + <comment>GLSL Fragment Shader file</comment> + <glob pattern=\'*.frag\'/> + </mime-type> + + <mime-type type=\'text/x-glsl-es-frag\'> + <sub-class-of type=\'text/x-glsl\'/> + <comment>GLSL/ES Fragment Shader file</comment> + <glob pattern=\'*.fsh\'/> + </mime-type> + + <mime-type type=\'text/x-glsl-vert\'> + <sub-class-of type=\'text/x-glsl\'/> + <comment>GLSL Vertex Shader file</comment> + <glob pattern=\'*.vert\'/> + </mime-type> + + <mime-type type=\'text/x-glsl-es-vert\'> + <sub-class-of type=\'text/x-glsl\'/> + <comment>GLSL/ES Vertex Shader file</comment> + <glob pattern=\'*.vsh\'/> + </mime-type> + + <mime-type type=\'text/x-glsl-es-geometry\'> + <sub-class-of type=\'text/x-glsl\'/> + <comment>GLSL/ES Geometry Shader file</comment> + <glob pattern=\'*.gsh\'/> + </mime-type> + + </mime-info> + \" } diff --git a/src/plugins/glsleditor/GLSLEditor.mimetypes.xml b/src/plugins/glsleditor/GLSLEditor.mimetypes.xml deleted file mode 100644 index 8f4570980a4..00000000000 --- a/src/plugins/glsleditor/GLSLEditor.mimetypes.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0"?> -<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> - - <mime-type type="application/x-glsl"> - <alias type="text/x-glsl"/> - <sub-class-of type="text/plain"/> - <comment>GLSL Shader file</comment> - <glob pattern="*.glsl"/> - <glob pattern="*.shader"/> - </mime-type> - - <mime-type type="text/x-glsl-frag"> - <sub-class-of type="text/x-glsl"/> - <comment>GLSL Fragment Shader file</comment> - <glob pattern="*.frag"/> - </mime-type> - - <mime-type type="text/x-glsl-es-frag"> - <sub-class-of type="text/x-glsl"/> - <comment>GLSL/ES Fragment Shader file</comment> - <glob pattern="*.fsh"/> - </mime-type> - - <mime-type type="text/x-glsl-vert"> - <sub-class-of type="text/x-glsl"/> - <comment>GLSL Vertex Shader file</comment> - <glob pattern="*.vert"/> - </mime-type> - - <mime-type type="text/x-glsl-es-vert"> - <sub-class-of type="text/x-glsl"/> - <comment>GLSL/ES Vertex Shader file</comment> - <glob pattern="*.vsh"/> - </mime-type> - - <mime-type type="text/x-glsl-es-geometry"> - <sub-class-of type="text/x-glsl"/> - <comment>GLSL/ES Geometry Shader file</comment> - <glob pattern="*.gsh"/> - </mime-type> - -</mime-info> diff --git a/src/plugins/glsleditor/glsleditor.qrc b/src/plugins/glsleditor/glsleditor.qrc index cb1c737c9a1..88d7aea098b 100644 --- a/src/plugins/glsleditor/glsleditor.qrc +++ b/src/plugins/glsleditor/glsleditor.qrc @@ -1,6 +1,5 @@ <RCC> <qresource prefix="/glsleditor"> - <file>GLSLEditor.mimetypes.xml</file> <file>images/glslfile.png</file> </qresource> </RCC> diff --git a/src/plugins/glsleditor/glsleditorplugin.cpp b/src/plugins/glsleditor/glsleditorplugin.cpp index 78455da651a..945e94f03b9 100644 --- a/src/plugins/glsleditor/glsleditorplugin.cpp +++ b/src/plugins/glsleditor/glsleditorplugin.cpp @@ -46,7 +46,6 @@ #include <texteditor/texteditorconstants.h> -#include <utils/mimetypes/mimedatabase.h> #include <utils/qtcassert.h> #include <QAction> @@ -117,8 +116,6 @@ GlslEditorPlugin::~GlslEditorPlugin() bool GlslEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage) { - Utils::MimeDatabase::addMimeTypes(QLatin1String(":/glsleditor/GLSLEditor.mimetypes.xml")); - addAutoReleasedObject(new GlslEditorFactory); addAutoReleasedObject(new GlslCompletionAssistProvider); |