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:
Eike Ziller
2022-08-24 14:54:30 +02:00
parent d454184467
commit 025bdfe702
4 changed files with 13 additions and 13 deletions

View File

@@ -47,9 +47,9 @@ namespace Internal {
// Return default for the ssh-askpass command (default to environment)
static QString sshPasswordPromptDefault()
{
const QByteArray envSetting = qgetenv("SSH_ASKPASS");
const QString envSetting = qtcEnvironmentVariable("SSH_ASKPASS");
if (!envSetting.isEmpty())
return QString::fromLocal8Bit(envSetting);
return envSetting;
if (HostOsInfo::isWindowsHost())
return QLatin1String("win-ssh-askpass");
return QLatin1String("ssh-askpass");