Utils: Remove some iterator bases accessed to Environment

Now unused.

Change-Id: I21bce9218662d9cb8acc18e5c2ede6dfbb8962bb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2023-03-02 13:54:49 +01:00
parent 2fd91ad18e
commit ae86a6a4bc
2 changed files with 1 additions and 9 deletions

View File

@@ -48,7 +48,7 @@ QProcessEnvironment Environment::toProcessEnvironment() const
QProcessEnvironment result; QProcessEnvironment result;
for (auto it = m_dict.m_values.constBegin(); it != m_dict.m_values.constEnd(); ++it) { for (auto it = m_dict.m_values.constBegin(); it != m_dict.m_values.constEnd(); ++it) {
if (it.value().second) if (it.value().second)
result.insert(it.key().name, expandedValueForKey(key(it))); result.insert(it.key().name, expandedValueForKey(m_dict.key(it)));
} }
return result; return result;
} }

View File

@@ -76,20 +76,12 @@ public:
OsType osType() const { return m_dict.osType(); } OsType osType() const { return m_dict.osType(); }
using const_iterator = NameValueMap::const_iterator; // FIXME: avoid
NameValueDictionary toDictionary() const { return m_dict; } // FIXME: avoid NameValueDictionary toDictionary() const { return m_dict; } // FIXME: avoid
NameValueItems diff(const Environment &other, bool checkAppendPrepend = false) const; // 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; } void setCombineWithDeviceEnvironment(bool combine) { m_combineWithDeviceEnvironment = combine; }
bool combineWithDeviceEnvironment() const { return m_combineWithDeviceEnvironment; } 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; }; struct Entry { QString key; QString value; bool enabled; };
using FindResult = std::optional<Entry>; using FindResult = std::optional<Entry>;
FindResult find(const QString &name) const; // Note res->key may differ in case from name. FindResult find(const QString &name) const; // Note res->key may differ in case from name.