forked from qt-creator/qt-creator
SshParameters: Remove return value from setupSshEnvironment()
Change-Id: I3e58454f23b5828991a5da1a88913f68d0f3ac9b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -75,12 +75,11 @@ QStringList SshParameters::connectionOptions(const FilePath &binary) const
|
||||
return args;
|
||||
}
|
||||
|
||||
bool SshParameters::setupSshEnvironment(Process *process)
|
||||
void SshParameters::setupSshEnvironment(Process *process)
|
||||
{
|
||||
Environment env = process->controlEnvironment();
|
||||
if (!env.hasChanges())
|
||||
env = Environment::systemEnvironment();
|
||||
const bool hasDisplay = env.hasKey("DISPLAY") && (env.value("DISPLAY") != QString(":0"));
|
||||
if (SshSettings::askpassFilePath().exists()) {
|
||||
env.set("SSH_ASKPASS", SshSettings::askpassFilePath().toUserOutput());
|
||||
env.set("SSH_ASKPASS_REQUIRE", "force");
|
||||
@@ -93,7 +92,6 @@ bool SshParameters::setupSshEnvironment(Process *process)
|
||||
|
||||
// Otherwise, ssh will ignore SSH_ASKPASS and read from /dev/tty directly.
|
||||
process->setDisableUnixTerminal();
|
||||
return hasDisplay;
|
||||
}
|
||||
|
||||
bool operator==(const SshParameters &p1, const SshParameters &p2)
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
AuthenticationType authenticationType = AuthenticationTypeAll;
|
||||
SshHostKeyCheckingMode hostKeyCheckingMode = SshHostKeyCheckingAllowNoMatch;
|
||||
|
||||
static bool setupSshEnvironment(Utils::Process *process);
|
||||
static void setupSshEnvironment(Utils::Process *process);
|
||||
|
||||
friend PROJECTEXPLORER_EXPORT bool operator==(const SshParameters &p1, const SshParameters &p2);
|
||||
friend bool operator!=(const SshParameters &p1, const SshParameters &p2) { return !(p1 == p2); }
|
||||
|
Reference in New Issue
Block a user