forked from qt-creator/qt-creator
VCS: Use qtcEnvironmentVariable* instead of qEnvironmentVariable*
And instead of qgetenv. Takes Qt Creator's setting at "Environment > System > Environment" into account, which makes it easier on some platforms to set them (e.g. macOS), can be configured differently in different settings paths, and potentially can be changed at runtime (depending on usage). Change-Id: I364e5b663353f37121279a58f4a9fd514cddbbf0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -2244,11 +2244,10 @@ Environment GitClient::processEnvironment() const
|
||||
environment.prependOrSetPath(FilePath::fromUserInput(gitPath));
|
||||
if (HostOsInfo::isWindowsHost() && settings().winSetHomeEnvironment.value()) {
|
||||
QString homePath;
|
||||
if (qEnvironmentVariableIsEmpty("HOMESHARE")) {
|
||||
if (qtcEnvironmentVariableIsEmpty("HOMESHARE")) {
|
||||
homePath = QDir::toNativeSeparators(QDir::homePath());
|
||||
} else {
|
||||
homePath = QString::fromLocal8Bit(qgetenv("HOMEDRIVE"))
|
||||
+ QString::fromLocal8Bit(qgetenv("HOMEPATH"));
|
||||
homePath = qtcEnvironmentVariable("HOMEDRIVE") + qtcEnvironmentVariable("HOMEPATH");
|
||||
}
|
||||
environment.set("HOME", homePath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user