forked from qt-creator/qt-creator
ShellCommand: De-virtualize environment()
Provide instead a protected setter, used in VcsCommand c'tor. Remove a forceCLocale arg from setProcessEnvironment() method, as it is used only in VcsCommand context when ShellCommand::ForceCLocale flag was set. Move setting C locale env directly to the shell command, just before the command is executed, so that we are sure the flag was already set. Modify env directly in VcsCommand c'tor with regards to SSH_ASKPASS variable. Change-Id: Icff555ade4984368f7ce79f762d1bb5d3614076a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -734,12 +734,8 @@ QString source(IDocument *document)
|
||||
return document->property(SOURCE_PROPERTY).toString();
|
||||
}
|
||||
|
||||
void setProcessEnvironment(Environment *e, bool forceCLocale)
|
||||
void setProcessEnvironment(Environment *e)
|
||||
{
|
||||
if (forceCLocale) {
|
||||
e->set("LANG", "C");
|
||||
e->set("LANGUAGE", "C");
|
||||
}
|
||||
const QString prompt = Internal::VcsPlugin::instance()->settings().sshPasswordPrompt.value();
|
||||
if (!prompt.isEmpty())
|
||||
e->set("SSH_ASKPASS", prompt);
|
||||
|
||||
Reference in New Issue
Block a user