forked from qt-creator/qt-creator
Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container [clazy-container-anti-pattern] Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -70,13 +70,14 @@ void TestSettings::toSettings(QSettings *s) const
|
||||
s->setValue(popupOnFailKey, popupOnFail);
|
||||
s->setValue(runAfterBuildKey, int(runAfterBuild));
|
||||
// store frameworks and their current active and grouping state
|
||||
for (const Utils::Id &id : frameworks.keys()) {
|
||||
s->setValue(id.toString(), frameworks.value(id));
|
||||
for (auto it = frameworks.cbegin(); it != frameworks.cend(); ++it) {
|
||||
const Utils::Id &id = it.key();
|
||||
s->setValue(id.toString(), it.value());
|
||||
s->setValue(id.toString() + groupSuffix, frameworksGrouping.value(id));
|
||||
}
|
||||
// ..and the testtools as well
|
||||
for (const Utils::Id &id : tools.keys())
|
||||
s->setValue(id.toString(), tools.value(id));
|
||||
for (auto it = tools.cbegin(); it != tools.cend(); ++it)
|
||||
s->setValue(it.key().toString(), it.value());
|
||||
s->endGroup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user