Use build step ids for construction in more cases

Change-Id: If2deb7c02c082e29cc6b1f0408c0d0e06d1c584b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-06-26 13:23:44 +02:00
parent 54c82c950c
commit f878486fcb
7 changed files with 12 additions and 13 deletions

View File

@@ -91,7 +91,7 @@ void CMakeBuildConfiguration::initialize(const BuildInfo &info)
BuildConfiguration::initialize(info);
BuildStepList *buildSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
buildSteps->appendStep(new CMakeBuildStep(buildSteps));
buildSteps->appendStep(Constants::CMAKE_BUILD_STEP_ID);
if (DeviceTypeKitAspect::deviceTypeId(target()->kit())
== Android::Constants::ANDROID_DEVICE_TYPE) {
@@ -125,7 +125,7 @@ void CMakeBuildConfiguration::initialize(const BuildInfo &info)
}
BuildStepList *cleanSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
cleanSteps->appendStep(new CMakeBuildStep(cleanSteps));
cleanSteps->appendStep(Constants::CMAKE_BUILD_STEP_ID);
if (info.buildDirectory.isEmpty()) {
auto project = target()->project();

View File

@@ -40,7 +40,6 @@
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/namedwidget.h>
#include <projectexplorer/processstep.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/target.h>
@@ -508,7 +507,7 @@ void CompilationDatabaseBuildConfiguration::initialize(const ProjectExplorer::Bu
{
ProjectExplorer::BuildConfiguration::initialize(info);
BuildStepList *buildSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
buildSteps->appendStep(new ProjectExplorer::ProcessStep(buildSteps));
buildSteps->appendStep(ProjectExplorer::Constants::PROCESS_STEP_ID);
}
ProjectExplorer::NamedWidget *CompilationDatabaseBuildConfiguration::createConfigWidget()

View File

@@ -42,13 +42,12 @@ using namespace Utils;
namespace ProjectExplorer {
const char PROCESS_STEP_ID[] = "ProjectExplorer.ProcessStep";
const char PROCESS_COMMAND_KEY[] = "ProjectExplorer.ProcessStep.Command";
const char PROCESS_WORKINGDIRECTORY_KEY[] = "ProjectExplorer.ProcessStep.WorkingDirectory";
const char PROCESS_ARGUMENTS_KEY[] = "ProjectExplorer.ProcessStep.Arguments";
ProcessStep::ProcessStep(BuildStepList *bsl)
: AbstractProcessStep(bsl, PROCESS_STEP_ID)
: AbstractProcessStep(bsl, Constants::PROCESS_STEP_ID)
{
//: Default ProcessStep display name
setDefaultDisplayName(tr("Custom Process Step"));
@@ -116,7 +115,7 @@ void ProcessStep::setupProcessParameters(ProcessParameters *pp)
ProcessStepFactory::ProcessStepFactory()
{
registerStep<ProcessStep>(PROCESS_STEP_ID);
registerStep<ProcessStep>(Constants::PROCESS_STEP_ID);
setDisplayName(ProcessStep::tr("Custom Process Step", "item in combobox"));
}

View File

@@ -150,6 +150,8 @@ const char BUILDSTEPS_CLEAN[] = "ProjectExplorer.BuildSteps.Clean";
const char BUILDSTEPS_BUILD[] = "ProjectExplorer.BuildSteps.Build";
const char BUILDSTEPS_DEPLOY[] = "ProjectExplorer.BuildSteps.Deploy";
const char PROCESS_STEP_ID[] = "ProjectExplorer.ProcessStep";
// Language
// Keep these short: These constants are exposed to the MacroExplorer!

View File

@@ -135,10 +135,10 @@ void QmakeBuildConfiguration::initialize(const BuildInfo &info)
BuildStepList *buildSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
auto qmakeStep = new QMakeStep(buildSteps);
buildSteps->appendStep(qmakeStep);
buildSteps->appendStep(new QmakeMakeStep(buildSteps));
buildSteps->appendStep(Constants::MAKESTEP_BS_ID);
BuildStepList *cleanSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
cleanSteps->appendStep(new QmakeMakeStep(cleanSteps));
cleanSteps->appendStep(Constants::MAKESTEP_BS_ID);
const QmakeExtraBuildInfo qmakeExtra = info.extraInfo.value<QmakeExtraBuildInfo>();
BaseQtVersion *version = QtKitAspect::qtVersion(target()->kit());

View File

@@ -53,10 +53,8 @@ using namespace ProjectExplorer;
using namespace QmakeProjectManager;
using namespace QmakeProjectManager::Internal;
const char MAKESTEP_BS_ID[] = "Qt4ProjectManager.MakeStep";
QmakeMakeStep::QmakeMakeStep(BuildStepList *bsl)
: MakeStep(bsl, MAKESTEP_BS_ID)
: MakeStep(bsl, Constants::MAKESTEP_BS_ID)
{
if (bsl->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
setClean(true);
@@ -221,7 +219,7 @@ void QmakeMakeStep::finish(bool success)
QmakeMakeStepFactory::QmakeMakeStepFactory()
{
registerStep<QmakeMakeStep>(MAKESTEP_BS_ID);
registerStep<QmakeMakeStep>(Constants::MAKESTEP_BS_ID);
setSupportedProjectType(Constants::QMAKEPROJECT_ID);
setDisplayName(MakeStep::defaultDisplayName());
}

View File

@@ -63,6 +63,7 @@ const char PROFILE_EVALUATE[] = "Qt4ProjectManager.ProFileEvaluate";
const char QMAKEPROJECT_ID[] = "Qt4ProjectManager.Qt4Project";
const char QMAKE_BC_ID[] = "Qt4ProjectManager.Qt4BuildConfiguration";
const char MAKESTEP_BS_ID[] = "Qt4ProjectManager.MakeStep";
// ICONS
const char ICON_QTQUICK_APP[] = ":/wizards/images/qtquickapp.png";