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,15 @@
|
||||
\"Category\" : \"Version Control\",
|
||||
\"Description\" : \"CVS integration.\",
|
||||
\"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=\'text/vnd.qtcreator.cvs.submit\'>
|
||||
<comment>CVS submit template</comment>
|
||||
<sub-class-of type=\'text/plain\'/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
\"
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
|
||||
<mime-type type="text/vnd.qtcreator.cvs.submit">
|
||||
<comment>CVS submit template</comment>
|
||||
<sub-class-of type="text/plain"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
@@ -21,5 +21,3 @@ SOURCES += annotationhighlighter.cpp \
|
||||
cvsutils.cpp
|
||||
|
||||
FORMS += settingspage.ui
|
||||
|
||||
RESOURCES += cvs.qrc
|
||||
|
||||
@@ -13,7 +13,6 @@ QtcPlugin {
|
||||
files: [
|
||||
"annotationhighlighter.cpp",
|
||||
"annotationhighlighter.h",
|
||||
"cvs.qrc",
|
||||
"cvsclient.cpp",
|
||||
"cvsclient.h",
|
||||
"cvscontrol.cpp",
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/trolltech.cvs">
|
||||
<file>CVS.mimetypes.xml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -56,7 +56,6 @@
|
||||
#include <coreplugin/locator/commandlocator.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/mimetypes/mimedatabase.h>
|
||||
#include <utils/stringutils.h>
|
||||
|
||||
#include <QDebug>
|
||||
@@ -203,8 +202,6 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
m_cvsPluginInstance = this;
|
||||
|
||||
Utils::MimeDatabase::addMimeTypes(QLatin1String(":/trolltech.cvs/CVS.mimetypes.xml"));
|
||||
|
||||
m_client = new CvsClient;
|
||||
|
||||
addAutoReleasedObject(new SettingsPage(versionControl()));
|
||||
|
||||
Reference in New Issue
Block a user