diff options
author | hjk <hjk@qt.io> | 2019-01-29 16:51:17 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-01-30 16:51:05 +0000 |
commit | 9bb936499d5e386a3439e6e2856acf0caba38bc7 (patch) | |
tree | 2d8503afa77b52696a1aa83b2c6a949b64c18b8e /src/plugins/projectexplorer/target.cpp | |
parent | 5cf2889856847389556e6adba3e3609252dd1429 (diff) |
ProjectExplorer: Collapse BuildInfo hierarchy
... to pass it around as real values, avoiding, among others,
the need of occasional explicit deletion.
The formerly extra members of the derived stuff are handled via
an extra variant (for data) and via a functor in the build
configuration factory.
The change is mechanical.
Change-Id: I19ca4e0c5f0a5b196fc16dfb98bb005dc679f855
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/target.cpp')
-rw-r--r-- | src/plugins/projectexplorer/target.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index f8a3efaca9..70d742e34e 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -493,14 +493,10 @@ void Target::updateDefaultBuildConfigurations() qWarning("No build configuration factory found for target id '%s'.", qPrintable(id().toString())); return; } - QList<BuildInfo *> infoList = bcFactory->availableSetups(this->kit(), project()->projectFilePath().toString()); - foreach (BuildInfo *info, infoList) { - BuildConfiguration *bc = bcFactory->create(this, info); - if (!bc) - continue; - addBuildConfiguration(bc); + for (const BuildInfo &info : bcFactory->allAvailableSetups(kit(), project()->projectFilePath().toString())) { + if (BuildConfiguration *bc = bcFactory->create(this, info)) + addBuildConfiguration(bc); } - qDeleteAll(infoList); } void Target::updateDefaultDeployConfigurations() |