QbsProjectManager: Fix detaching of Qt containers in for loops

Found by clazy.

Change-Id: I9ccca922f6aa8b6a8f1c16c6e62db8dae3c4cc6f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Joerg Bornemann
2017-10-19 13:46:45 +02:00
parent e71912b45b
commit a181c3e4d7
3 changed files with 8 additions and 4 deletions

View File

@@ -701,7 +701,8 @@ void QbsProject::configureAsExampleProject(const QSet<Id> &platforms)
= IBuildConfigurationFactory::find(k, projectFilePath().toString());
if (!factory)
continue;
for (BuildInfo * const info : factory->availableSetups(k, projectFilePath().toString()))
const auto &buildInfos = factory->availableSetups(k, projectFilePath().toString());
for (BuildInfo * const info : buildInfos)
infoList << info;
}
setup(infoList);