forked from qt-creator/qt-creator
CMake: Use callback-based environment iteration
Hides underlying data structure. Task-number: QTCREATORBUG-28357 Change-Id: Ib0d7fb70afa820b1bd28d23e12b9379a6de6546b Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -456,9 +456,9 @@ static QHash<QString, QString> merge(const QHash<QString, QString> &first,
|
||||
static Utils::Environment merge(const Utils::Environment &first, const Utils::Environment &second)
|
||||
{
|
||||
Utils::Environment result = first;
|
||||
for (auto it = second.constBegin(); it != second.constEnd(); ++it) {
|
||||
result.set(it.key().name, it.value().first);
|
||||
}
|
||||
second.forEachEntry([&](const QString &key, const QString &value, bool) {
|
||||
result.set(key, value);
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user