aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-12-20 17:05:30 +0100
committerhjk <hjk@qt.io>2020-01-09 11:26:01 +0000
commitc95bde6f6a638ddf4197c1fb56968de8794c9b35 (patch)
tree0b282897bdf5db53355ea95e2117e214b0c7cdf3 /src/plugins/projectexplorer
parent2f5365bf6102e44c9af1c330601a22f4d34f9631 (diff)
ProjectExplorer: Pass Id to BuildStep constructor
Allows to use constants in fewer places, similar to what e.g. RunConfiguration does. Change-Id: I9d049128206c4acf0ce14b06b66d6c090a7c5242 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/buildstep.h2
-rw-r--r--src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.cpp4
-rw-r--r--src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.h5
-rw-r--r--src/plugins/projectexplorer/processstep.cpp6
-rw-r--r--src/plugins/projectexplorer/processstep.h2
-rw-r--r--src/plugins/projectexplorer/projectexplorerconstants.h2
6 files changed, 9 insertions, 12 deletions
diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h
index 0c9a85e9b3..4c45fefb7f 100644
--- a/src/plugins/projectexplorer/buildstep.h
+++ b/src/plugins/projectexplorer/buildstep.h
@@ -184,7 +184,7 @@ protected:
{
QTC_CHECK(!m_info.creator);
m_info.id = id;
- m_info.creator = [](BuildStepList *bsl) { return new BuildStepType(bsl); };
+ m_info.creator = [id](BuildStepList *bsl) { return new BuildStepType(bsl, id); };
}
void setSupportedStepList(Core::Id id);
diff --git a/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.cpp b/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.cpp
index 29e95751f6..8d8a61d285 100644
--- a/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.cpp
+++ b/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.cpp
@@ -35,8 +35,8 @@
using namespace ProjectExplorer;
-DeviceCheckBuildStep::DeviceCheckBuildStep(BuildStepList *bsl)
- : BuildStep(bsl, stepId())
+DeviceCheckBuildStep::DeviceCheckBuildStep(BuildStepList *bsl, Core::Id id)
+ : BuildStep(bsl, id)
{
setDefaultDisplayName(displayName());
setWidgetExpandedByDefault(false);
diff --git a/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.h b/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.h
index 6fc984b690..ff4dd8aeb8 100644
--- a/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.h
+++ b/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.h
@@ -30,13 +30,12 @@
namespace ProjectExplorer {
-class BuildStepList;
-
class PROJECTEXPLORER_EXPORT DeviceCheckBuildStep : public BuildStep
{
Q_OBJECT
+
public:
- explicit DeviceCheckBuildStep(BuildStepList *bsl);
+ DeviceCheckBuildStep(BuildStepList *bsl, Core::Id id);
bool init() override;
void doRun() override;
diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp
index 89062879d3..c061eee1c1 100644
--- a/src/plugins/projectexplorer/processstep.cpp
+++ b/src/plugins/projectexplorer/processstep.cpp
@@ -46,8 +46,8 @@ 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, Constants::PROCESS_STEP_ID)
+ProcessStep::ProcessStep(BuildStepList *bsl, Core::Id id)
+ : AbstractProcessStep(bsl, id)
{
//: Default ProcessStep display name
setDefaultDisplayName(tr("Custom Process Step"));
@@ -115,7 +115,7 @@ void ProcessStep::setupProcessParameters(ProcessParameters *pp)
ProcessStepFactory::ProcessStepFactory()
{
- registerStep<ProcessStep>(Constants::PROCESS_STEP_ID);
+ registerStep<ProcessStep>("ProjectExplorer.ProcessStep");
setDisplayName(ProcessStep::tr("Custom Process Step", "item in combobox"));
}
diff --git a/src/plugins/projectexplorer/processstep.h b/src/plugins/projectexplorer/processstep.h
index 4ef741588b..95f0f49a22 100644
--- a/src/plugins/projectexplorer/processstep.h
+++ b/src/plugins/projectexplorer/processstep.h
@@ -43,7 +43,7 @@ class PROJECTEXPLORER_EXPORT ProcessStep : public AbstractProcessStep
friend class ProcessStepFactory;
public:
- explicit ProcessStep(BuildStepList *bsl);
+ ProcessStep(BuildStepList *bsl, Core::Id id);
private:
bool init() override;
diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h
index ddac904c2d..4855035908 100644
--- a/src/plugins/projectexplorer/projectexplorerconstants.h
+++ b/src/plugins/projectexplorer/projectexplorerconstants.h
@@ -152,8 +152,6 @@ 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!