forked from qt-creator/qt-creator
Revert "Port to Qt 6's absence of QProcess::setupChildProcess"
This reverts commit 6a66ced594.
The patch that will introduce the alternative to setupChildProcess
(QProcess::setChildProcessModifier()) has not yet found its
way to qtbase and current Qt dev already identifies itself as
version 6.0.0, rendering the code here uncompilable.
Change-Id: I570b01598005070f0c17604226d245a3a381250e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -47,12 +47,6 @@ SshProcess::SshProcess()
|
||||
env.set("DISPLAY", ":0");
|
||||
}
|
||||
setProcessEnvironment(env.toProcessEnvironment());
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) && defined(Q_OS_UNIX)
|
||||
setChildProcessModifier([]() {
|
||||
setsid(); // Otherwise, ssh will ignore SSH_ASKPASS and read from /dev/tty directly.
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
SshProcess::~SshProcess()
|
||||
@@ -68,13 +62,11 @@ SshProcess::~SshProcess()
|
||||
waitForFinished(1000);
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
void SshProcess::setupChildProcess()
|
||||
{
|
||||
#ifdef Q_OS_UNIX
|
||||
setsid(); // Otherwise, ssh will ignore SSH_ASKPASS and read from /dev/tty directly.
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace QSsh
|
||||
|
||||
Reference in New Issue
Block a user