forked from qt-creator/qt-creator
Move mimetype definitions to plugin specs
- Avoids the hassle of QRC files and manually registering mime types - Avoids performance regressions because of mime types that are registered after mime database has been used - Makes it technically possible to detect that a disabled plugin could handle a mime type if it was enabled Change-Id: I373008b1b56e9c6b4853055f20b3eeb112a6eff9 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -15,5 +15,17 @@
|
||||
\"Category\" : \"Qt Quick\",
|
||||
\"Description\" : \"Qt Quick support\",
|
||||
\"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-qmlproject\'>
|
||||
<sub-class-of type=\'text/x-qml\'/>
|
||||
<comment>QML Project file</comment>
|
||||
<glob pattern=\'*.qmlproject\'/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
\"
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
|
||||
<mime-type type="application/x-qmlproject">
|
||||
<sub-class-of type="text/x-qml"/>
|
||||
<comment>QML Project file</comment>
|
||||
<glob pattern="*.qmlproject"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
@@ -1,6 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/qmlproject">
|
||||
<file>QmlProjectManager.mimetypes.xml</file>
|
||||
<file>images/qmlfolder.png</file>
|
||||
<file>images/qmlproject.png</file>
|
||||
</qresource>
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
|
||||
#include <utils/mimetypes/mimedatabase.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
|
||||
#include <QApplication>
|
||||
@@ -54,7 +52,6 @@ QmlProjectPlugin::~QmlProjectPlugin()
|
||||
bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
|
||||
{
|
||||
Q_UNUSED(errorMessage)
|
||||
Utils::MimeDatabase::addMimeTypes(QLatin1String(":/qmlproject/QmlProjectManager.mimetypes.xml"));
|
||||
|
||||
addAutoReleasedObject(new Internal::Manager);
|
||||
addAutoReleasedObject(new Internal::QmlProjectRunConfigurationFactory);
|
||||
|
||||
Reference in New Issue
Block a user