Commit 271a96b1 authored by Fawzi Mohamed's avatar Fawzi Mohamed

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: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent e7f9a209
......@@ -68,7 +68,6 @@ SOURCES += \
qmljswrapinloader.cpp
RESOURCES += qmljseditor.qrc
OTHER_FILES += QmlJSEditor.mimetypes.xml
FORMS += \
quicktoolbarsettingspage.ui \
......
......@@ -17,7 +17,6 @@ QtcPlugin {
Depends { name: "CPlusPlus" }
files: [
"QmlJSEditor.mimetypes.xml",
"jsfilewizard.cpp",
"jsfilewizard.h",
"qmlexpressionundercursor.cpp",
......
<RCC>
<qresource prefix="/qmljseditor">
<file>QmlJSEditor.mimetypes.xml</file>
<file>images/qmlfile.png</file>
</qresource>
</RCC>
......@@ -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);
......
......@@ -60,6 +60,9 @@ SOURCES += \
RESOURCES += \
qmljstools.qrc
OTHER_FILES += \
QmlJSTools.mimetypes.xml
FORMS += \
$$PWD/qmljscodestylesettingspage.ui
......
......@@ -20,6 +20,7 @@ QtcPlugin {
cpp.includePaths: base.concat("../../libs/3rdparty")
files: [
"QmlJSTools.mimetypes.xml",
"qmljsbundleprovider.cpp",
"qmljsbundleprovider.h",
"qmljscodestylepreferencesfactory.cpp",
......
......@@ -6,5 +6,6 @@
<file>images/log.png</file>
<file>images/expand.png</file>
<file>images/error.png</file>
<file>QmlJSTools.mimetypes.xml</file>
</qresource>
</RCC>
......@@ -41,6 +41,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <QtPlugin>
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment