forked from qt-creator/qt-creator
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:
@@ -31,7 +31,7 @@
|
||||
#include "project/nimbuildconfigurationfactory.h"
|
||||
#include "project/nimcompilerbuildstepfactory.h"
|
||||
#include "project/nimcompilercleanstepfactory.h"
|
||||
#include "project/nimprojectmanager.h"
|
||||
#include "project/nimproject.h"
|
||||
#include "project/nimrunconfigurationfactory.h"
|
||||
#include "project/nimruncontrolfactory.h"
|
||||
#include "project/nimtoolchainfactory.h"
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "settings/nimsnippetprovider.h"
|
||||
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
#include <projectexplorer/projectmanager.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
@@ -71,7 +72,6 @@ bool NimPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
addAutoReleasedObject(new NimSettings);
|
||||
addAutoReleasedObject(new NimSnippetProvider);
|
||||
addAutoReleasedObject(new NimEditorFactory);
|
||||
addAutoReleasedObject(new NimProjectManager);
|
||||
addAutoReleasedObject(new NimBuildConfigurationFactory);
|
||||
addAutoReleasedObject(new NimRunConfigurationFactory);
|
||||
addAutoReleasedObject(new NimCompilerBuildStepFactory);
|
||||
@@ -81,6 +81,8 @@ bool NimPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
addAutoReleasedObject(new NimCodeStylePreferencesFactory);
|
||||
addAutoReleasedObject(new NimToolChainFactory);
|
||||
|
||||
ProjectExplorer::ProjectManager::registerProjectType<NimProject>(Constants::C_NIM_PROJECT_MIMETYPE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user