From ae86a6a4bc6ccd93e704d49490791096c1a39085 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 2 Mar 2023 13:54:49 +0100 Subject: [PATCH] Utils: Remove some iterator bases accessed to Environment Now unused. Change-Id: I21bce9218662d9cb8acc18e5c2ede6dfbb8962bb Reviewed-by: Christian Kandeler --- src/libs/utils/environment.cpp | 2 +- src/libs/utils/environment.h | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) 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.