qmljs: moving all mime types into qmljstools

This reduces uneeded dependencies for modules that need the types
like the qbs module.

Change-Id: I59a6067a4c24a6d0401bf57fdfa8f5dc1f03595c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Fawzi Mohamed
2013-05-29 14:04:33 +02:00
parent e7f9a209ea
commit 271a96b19a
9 changed files with 10 additions and 7 deletions

View File

@@ -1,42 +0,0 @@
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-qml">
<alias type="text/x-qml"/>
<sub-class-of type="text/plain"/>
<comment>QML file</comment>
<glob pattern="*.qml"/>
</mime-type>
<mime-type type="application/x-qt.qbs+qml">
<alias type="text/x-qt.qbs+qml"/>
<sub-class-of type="application/x-qml"/>
<comment>Qt Build Suite file</comment>
<glob pattern="*.qbs"/>
</mime-type>
<mime-type type="application/x-qmlproject">
<alias type="text/x-qmlproject"/>
<sub-class-of type="application/x-qml"/>
<comment>Qt Creator Qt UI project file</comment>
<glob pattern="*.qmlproject"/>
</mime-type>
<mime-type type="application/x-qt.meta-info+qml">
<alias type="text/x-qt.meta-info+qml"/>
<sub-class-of type="application/x-qml"/>
<comment>QML file</comment>
<glob pattern="*.qmltypes"/>
</mime-type>
<mime-type type="application/javascript">
<alias type="application/x-javascript"/>
<alias type="text/javascript"/>
<alias type="text/x-javascript"/>
<sub-class-of type="text/plain"/>
<comment>Qt Script file</comment>
<glob pattern="*.js"/>
<glob pattern="*.qs"/>
<glob pattern="*.qtt"/>
</mime-type>
<mime-type type="application/json">
<sub-class-of type="text/plain"/>
<comment>JSON file</comment>
<glob pattern="*.json"/>
</mime-type>
</mime-info>

View File

@@ -68,7 +68,6 @@ SOURCES += \
qmljswrapinloader.cpp
RESOURCES += qmljseditor.qrc
OTHER_FILES += QmlJSEditor.mimetypes.xml
FORMS += \
quicktoolbarsettingspage.ui \

View File

@@ -17,7 +17,6 @@ QtcPlugin {
Depends { name: "CPlusPlus" }
files: [
"QmlJSEditor.mimetypes.xml",
"jsfilewizard.cpp",
"jsfilewizard.h",
"qmlexpressionundercursor.cpp",

View File

@@ -1,6 +1,5 @@
<RCC>
<qresource prefix="/qmljseditor">
<file>QmlJSEditor.mimetypes.xml</file>
<file>images/qmlfile.png</file>
</qresource>
</RCC>

View File

@@ -53,7 +53,6 @@
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/id.h>
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -114,9 +113,6 @@ QmlJSEditorPlugin::~QmlJSEditorPlugin()
bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
{
if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":/qmljseditor/QmlJSEditor.mimetypes.xml"), errorMessage))
return false;
m_modelManager = QmlJS::ModelManagerInterface::instance();
addAutoReleasedObject(new QmlJSSnippetProvider);