forked from qt-creator/qt-creator
Environment::value(): Use findKey() helper
Also change path() to use value() so that "Path" as used on Windows will be found as well. Task-number: QTCREATORBUG-18958 Change-Id: Ie930f6a6e71c76459cf9d089c225f5b1adf52433 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -454,13 +454,14 @@ FileName Environment::searchInPath(const QString &executable,
|
||||
|
||||
QStringList Environment::path() const
|
||||
{
|
||||
return m_values.value("PATH")
|
||||
return value("PATH")
|
||||
.split(OsSpecificAspects(m_osType).pathListSeparator(), QString::SkipEmptyParts);
|
||||
}
|
||||
|
||||
QString Environment::value(const QString &key) const
|
||||
{
|
||||
return m_values.value(key);
|
||||
const auto it = findKey(m_values, m_osType, key);
|
||||
return it != m_values.end() ? it.value() : QString();
|
||||
}
|
||||
|
||||
QString Environment::key(Environment::const_iterator it) const
|
||||
|
Reference in New Issue
Block a user