diff options
author | hjk <hjk@qt.io> | 2019-12-05 16:19:42 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-12-06 14:49:59 +0000 |
commit | 3c41b91d44838fcadfa50c4044e338d43a27cc10 (patch) | |
tree | ade3a866f972b8b4b367a21ccb88d7fa2417caff /src/plugins/qbsprojectmanager | |
parent | f0316dbae9405166c4a6981db55295440ded7962 (diff) |
ProjectExplorer: Settle on fixed set of build step lists
Even if the implementation allowed different lists than 'build'
and 'clean', that's the only set that has been used, ever.
If really needed, this could be re-instated, but for now having
them fixed removes part of the neeed for a two-phase construction
and helps to simplify user code.
Change-Id: I3df09a1829a7d020ef8963d358ea80f8d199ba13
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qbsprojectmanager')
-rw-r--r-- | src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp | 12 | ||||
-rw-r--r-- | src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp | 13 |
2 files changed, 12 insertions, 13 deletions
diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp index b24b28b5203..36ff246a055 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp @@ -126,8 +126,6 @@ BuildSystem *QbsBuildConfiguration::buildSystem() const void QbsBuildConfiguration::initialize() { - BuildConfiguration::initialize(); - QVariantMap configData = extraInfo().value<QVariantMap>(); configData.insert(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY), (initialBuildType() == BuildConfiguration::Debug) @@ -159,13 +157,11 @@ void QbsBuildConfiguration::initialize() m_configurationName->setValue(uniqueConfigName); - BuildStepList *buildSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD); - auto bs = new QbsBuildStep(buildSteps); + auto bs = new QbsBuildStep(buildSteps()); bs->setQbsConfiguration(bd); - buildSteps->appendStep(bs); + buildSteps()->appendStep(bs); - BuildStepList *cleanSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN); - cleanSteps->appendStep(Constants::QBS_CLEANSTEP_ID); + cleanSteps()->appendStep(Constants::QBS_CLEANSTEP_ID); emit qbsConfigurationChanged(); } @@ -204,7 +200,7 @@ void QbsBuildConfiguration::restrictNextBuild(const RunConfiguration *rc) QbsBuildStep *QbsBuildConfiguration::qbsStep() const { - return stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD)->firstOfType<QbsBuildStep>(); + return buildSteps()->firstOfType<QbsBuildStep>(); } QVariantMap QbsBuildConfiguration::qbsConfiguration() const diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp index 2a05225a1cb..958dae174f9 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp +++ b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp @@ -513,9 +513,7 @@ void QbsProjectManagerPlugin::buildFiles(QbsProject *project, const QStringList bc->setActiveFileTags(activeFileTags); bc->setProducts(QStringList()); - const Core::Id buildStep = ProjectExplorer::Constants::BUILDSTEPS_BUILD; - - BuildManager::buildList(bc->stepList(buildStep)); + BuildManager::buildList(bc->buildSteps()); bc->setChangedFiles(QStringList()); bc->setActiveFileTags(QStringList()); @@ -549,8 +547,13 @@ void QbsProjectManagerPlugin::runStepsForProducts(QbsProject *project, QList<ProjectExplorer::BuildStepList *> stepLists; QStringList stepListNames; for (const Core::Id &stepType : stepTypes) { - stepLists << bc->stepList(stepType); - stepListNames <<ProjectExplorerPlugin::displayNameForStepId(stepType); + if (stepType == ProjectExplorer::Constants::BUILDSTEPS_BUILD) { + stepLists << bc->buildSteps(); + stepListNames << ProjectExplorerPlugin::displayNameForStepId(stepType); + } else if (stepType == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) { + stepLists << bc->cleanSteps(); + stepListNames << ProjectExplorerPlugin::displayNameForStepId(stepType); + } } BuildManager::buildLists(stepLists, stepListNames); bc->setProducts(QStringList()); |