diff --git a/src/libs/utils/environment.cpp b/src/libs/utils/environment.cpp index eb49db208d7..462eeab31d7 100644 --- a/src/libs/utils/environment.cpp +++ b/src/libs/utils/environment.cpp @@ -48,7 +48,7 @@ QProcessEnvironment Environment::toProcessEnvironment() const QProcessEnvironment result; for (auto it = m_dict.m_values.constBegin(); it != m_dict.m_values.constEnd(); ++it) { if (it.value().second) - result.insert(it.key().name, expandedValueForKey(key(it))); + result.insert(it.key().name, expandedValueForKey(m_dict.key(it))); } return result; } diff --git a/src/libs/utils/environment.h b/src/libs/utils/environment.h index 1485dff2a12..541a730965b 100644 --- a/src/libs/utils/environment.h +++ b/src/libs/utils/environment.h @@ -76,20 +76,12 @@ public: OsType osType() const { return m_dict.osType(); } - using const_iterator = NameValueMap::const_iterator; // FIXME: avoid NameValueDictionary toDictionary() const { return m_dict; } // FIXME: avoid NameValueItems diff(const Environment &other, bool checkAppendPrepend = false) const; // FIXME: avoid - QString key(const_iterator it) const { return m_dict.key(it); } // FIXME: avoid - QString value(const_iterator it) const { return m_dict.value(it); } // FIXME: avoid - bool isEnabled(const_iterator it) const { return m_dict.isEnabled(it); } // FIXME: avoid - void setCombineWithDeviceEnvironment(bool combine) { m_combineWithDeviceEnvironment = combine; } bool combineWithDeviceEnvironment() const { return m_combineWithDeviceEnvironment; } - const_iterator constBegin() const { return m_dict.constBegin(); } // FIXME: avoid - const_iterator constEnd() const { return m_dict.constEnd(); } // FIXME: avoid - struct Entry { QString key; QString value; bool enabled; }; using FindResult = std::optional; FindResult find(const QString &name) const; // Note res->key may differ in case from name.