ProjectExplorer: Move part of deploy config initial step handling

... to BuildStepList so it can be re-used in BuildConfiguration
when attempting to set up a similar system to specify initial
population of step lists.

Change-Id: I2301feb2b67a80a9d9e526e4065b4d4487b7fdbd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-01-22 18:17:30 +01:00
parent a2224881b4
commit c04c5c1575
4 changed files with 18 additions and 10 deletions

View File

@@ -162,6 +162,14 @@ void BuildStepList::insertStep(int position, Core::Id stepId)
QTC_ASSERT(false, qDebug() << "No factory for build step" << stepId.toString() << "found.");
}
void BuildStepList::appendSteps(const QList<StepCreationInfo> &infos)
{
for (const StepCreationInfo &info : infos) {
if (!info.condition || info.condition(target()))
appendStep(info.stepId);
}
}
bool BuildStepList::removeStep(int position)
{
BuildStep *bs = at(position);