forked from qt-creator/qt-creator
Utils: use system case for environment variables on windows
Match case of user changed environment variables to the already defined variables. Change-Id: Ic012d35faa0822df3523ab642491c9f19051853c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -500,7 +500,7 @@ Environment::const_iterator Environment::constEnd() const
|
||||
|
||||
Environment::const_iterator Environment::constFind(const QString &name) const
|
||||
{
|
||||
return m_values.constFind(name);
|
||||
return findKey(m_values, m_osType, name);
|
||||
}
|
||||
|
||||
int Environment::size() const
|
||||
@@ -567,6 +567,11 @@ bool Environment::hasKey(const QString &key) const
|
||||
return m_values.contains(key);
|
||||
}
|
||||
|
||||
OsType Environment::osType() const
|
||||
{
|
||||
return m_osType;
|
||||
}
|
||||
|
||||
QString Environment::userName() const
|
||||
{
|
||||
return value(QString::fromLatin1(m_osType == OsTypeWindows ? "USERNAME" : "USER"));
|
||||
|
||||
Reference in New Issue
Block a user