diff options
author | hjk <hjk@qt.io> | 2018-05-04 16:52:21 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-05-08 08:13:00 +0000 |
commit | ce20bde99c6f7cd5b7fe7eb0b186727925adb116 (patch) | |
tree | ac1b1b1cc045a626cf41e1421a846423fa358b99 /src/plugins/cmakeprojectmanager | |
parent | 1678e9eb1e4dfcdd518218ca89455f6b667316d1 (diff) | |
download | qt-creator-ce20bde99c6f7cd5b7fe7eb0b186727925adb116.tar.gz |
ProjectExplorer: Pass id directly to BuildConfigurations
It's what the base class wants, and follows run and deploy precedence.
Change-Id: I26eff43337851702417e7e4284fc390b904060f6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/cmakeprojectmanager')
3 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 39ddb536a3..1aeed274a1 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -60,8 +60,8 @@ namespace Internal { const char INITIAL_ARGUMENTS[] = "CMakeProjectManager.CMakeBuildConfiguration.InitialArgument"; // Obsolete since QtC 3.7 const char CONFIGURATION_KEY[] = "CMake.Configuration"; -CMakeBuildConfiguration::CMakeBuildConfiguration(Target *parent) - : BuildConfiguration(parent, Constants::CMAKE_BC_ID) +CMakeBuildConfiguration::CMakeBuildConfiguration(Target *parent, Core::Id id) + : BuildConfiguration(parent, id) { CMakeProject *project = static_cast<CMakeProject *>(target()->project()); setBuildDirectory(shadowBuildDirectory(project->projectFilePath(), @@ -334,7 +334,8 @@ ProjectExplorer::NamedWidget *CMakeBuildConfiguration::createConfigWidget() CMakeBuildConfigurationFactory::CMakeBuildConfigurationFactory() { - registerBuildConfiguration<CMakeBuildConfiguration>(Constants::CMAKE_BC_ID); + registerBuildConfiguration<CMakeBuildConfiguration>("CMakeProjectManager.CMakeBuildConfiguration"); + setSupportedProjectType(CMakeProjectManager::Constants::CMAKEPROJECT_ID); setSupportedProjectMimeTypeName(Constants::CMAKEPROJECTMIMETYPE); } diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h index 5a381d0f47..a763fbc1c5 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h @@ -47,7 +47,7 @@ class CMakeBuildConfiguration : public ProjectExplorer::BuildConfiguration Q_OBJECT friend class ProjectExplorer::IBuildConfigurationFactory; - explicit CMakeBuildConfiguration(ProjectExplorer::Target *parent); + CMakeBuildConfiguration(ProjectExplorer::Target *parent, Core::Id id); public: void emitBuildTypeChanged(); diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h b/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h index bd9be308c3..e1e1a0114e 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectconstants.h @@ -42,9 +42,6 @@ const char RUNCMAKECONTEXTMENU[] = "CMakeProject.RunCMakeContextMenu"; // Project const char CMAKEPROJECT_ID[] = "CMakeProjectManager.CMakeProject"; -// Buildconfiguration -const char CMAKE_BC_ID[] = "CMakeProjectManager.CMakeBuildConfiguration"; - // Menu const char M_CONTEXT[] = "CMakeEditor.ContextMenu"; |