diff --git a/src/plugins/qmljseditor/qmljseditor.pro b/src/plugins/qmljseditor/qmljseditor.pro index d6201be0523..9a40aa33eae 100644 --- a/src/plugins/qmljseditor/qmljseditor.pro +++ b/src/plugins/qmljseditor/qmljseditor.pro @@ -68,7 +68,6 @@ SOURCES += \ qmljswrapinloader.cpp RESOURCES += qmljseditor.qrc -OTHER_FILES += QmlJSEditor.mimetypes.xml FORMS += \ quicktoolbarsettingspage.ui \ diff --git a/src/plugins/qmljseditor/qmljseditor.qbs b/src/plugins/qmljseditor/qmljseditor.qbs index 32d3ef4d359..72c9294c143 100644 --- a/src/plugins/qmljseditor/qmljseditor.qbs +++ b/src/plugins/qmljseditor/qmljseditor.qbs @@ -17,7 +17,6 @@ QtcPlugin { Depends { name: "CPlusPlus" } files: [ - "QmlJSEditor.mimetypes.xml", "jsfilewizard.cpp", "jsfilewizard.h", "qmlexpressionundercursor.cpp", diff --git a/src/plugins/qmljseditor/qmljseditor.qrc b/src/plugins/qmljseditor/qmljseditor.qrc index 38e57bac808..35ecba5f6ee 100644 --- a/src/plugins/qmljseditor/qmljseditor.qrc +++ b/src/plugins/qmljseditor/qmljseditor.qrc @@ -1,6 +1,5 @@ - QmlJSEditor.mimetypes.xml images/qmlfile.png diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index 21044644d23..afaafd6c331 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -53,7 +53,6 @@ #include #include -#include #include #include #include @@ -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); diff --git a/src/plugins/qmljseditor/QmlJSEditor.mimetypes.xml b/src/plugins/qmljstools/QmlJSTools.mimetypes.xml similarity index 100% rename from src/plugins/qmljseditor/QmlJSEditor.mimetypes.xml rename to src/plugins/qmljstools/QmlJSTools.mimetypes.xml diff --git a/src/plugins/qmljstools/qmljstools.pro b/src/plugins/qmljstools/qmljstools.pro index 93021dd6a87..c3fdd89e7d7 100644 --- a/src/plugins/qmljstools/qmljstools.pro +++ b/src/plugins/qmljstools/qmljstools.pro @@ -60,6 +60,9 @@ SOURCES += \ RESOURCES += \ qmljstools.qrc +OTHER_FILES += \ + QmlJSTools.mimetypes.xml + FORMS += \ $$PWD/qmljscodestylesettingspage.ui diff --git a/src/plugins/qmljstools/qmljstools.qbs b/src/plugins/qmljstools/qmljstools.qbs index 682dc34de17..dc8b1f78b2c 100644 --- a/src/plugins/qmljstools/qmljstools.qbs +++ b/src/plugins/qmljstools/qmljstools.qbs @@ -20,6 +20,7 @@ QtcPlugin { cpp.includePaths: base.concat("../../libs/3rdparty") files: [ + "QmlJSTools.mimetypes.xml", "qmljsbundleprovider.cpp", "qmljsbundleprovider.h", "qmljscodestylepreferencesfactory.cpp", diff --git a/src/plugins/qmljstools/qmljstools.qrc b/src/plugins/qmljstools/qmljstools.qrc index 9e396a3995a..ab7f6f798ca 100644 --- a/src/plugins/qmljstools/qmljstools.qrc +++ b/src/plugins/qmljstools/qmljstools.qrc @@ -6,5 +6,6 @@ images/log.png images/expand.png images/error.png + QmlJSTools.mimetypes.xml diff --git a/src/plugins/qmljstools/qmljstoolsplugin.cpp b/src/plugins/qmljstools/qmljstoolsplugin.cpp index 0d2889019c0..50d76d84276 100644 --- a/src/plugins/qmljstools/qmljstoolsplugin.cpp +++ b/src/plugins/qmljstools/qmljstoolsplugin.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -72,6 +73,10 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error) Q_UNUSED(arguments) Q_UNUSED(error) + if (!Core::ICore::mimeDatabase() + ->addMimeTypes(QLatin1String(":/qmljstools/QmlJSTools.mimetypes.xml"), error)) + return false; + m_settings = new QmlJSToolsSettings(this); // force registration of qmljstools settings // Objects