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:
Eike Ziller
2017-02-08 14:31:55 +01:00
parent ca1d1dfbe2
commit d64e17ad55
120 changed files with 596 additions and 650 deletions

View File

@@ -58,7 +58,6 @@
#include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditorconstants.h>
#include <utils/hostosinfo.h>
#include <utils/mimetypes/mimedatabase.h>
#include <utils/parameteraction.h>
#ifdef WITH_TESTS
@@ -83,8 +82,6 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString
const Context projectContext(QmakeProjectManager::Constants::PROJECT_ID);
Context projecTreeContext(ProjectExplorer::Constants::C_PROJECT_TREE);
Utils::MimeDatabase::addMimeTypes(QLatin1String(":qmakeprojectmanager/QmakeProjectManager.mimetypes.xml"));
//create and register objects
m_qmakeProjectManager = new QmakeManager;
addAutoReleasedObject(m_qmakeProjectManager);