ProjectExplorer: Follow up on too-much-magic in IProjectManager

Use a ProjectManager::registerProjectType<Project>(MimeType) function,
removing cryptic IProjectManager object ownership.

Change-Id: I212cd25bd4ee757022a8cb0decb4b8de3a112d12
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
hjk
2017-03-03 18:16:34 +01:00
parent 57144e28da
commit c1bfc5d8ec
54 changed files with 152 additions and 532 deletions

View File

@@ -26,7 +26,6 @@
#include "genericprojectplugin.h"
#include "genericbuildconfiguration.h"
#include "genericprojectmanager.h"
#include "genericprojectwizard.h"
#include "genericprojectconstants.h"
#include "genericprojectfileseditor.h"
@@ -39,6 +38,7 @@
#include <coreplugin/actionmanager/command.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectmanager.h>
#include <projectexplorer/projecttree.h>
#include <projectexplorer/selectablefilesmodel.h>
@@ -59,7 +59,8 @@ bool GenericProjectPlugin::initialize(const QStringList &, QString *errorMessage
{
Q_UNUSED(errorMessage)
addAutoReleasedObject(new Manager);
ProjectManager::registerProjectType<GenericProject>(Constants::GENERICMIMETYPE);
addAutoReleasedObject(new ProjectFilesFactory);
addAutoReleasedObject(new GenericMakeStepFactory);
addAutoReleasedObject(new GenericBuildConfigurationFactory);