From f2e06d276472c0138520e6f4b53df96d79163de5 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 11 Jun 2020 14:59:40 +0200 Subject: Revert "Port to Qt 6's absence of QProcess::setupChildProcess" This reverts commit 6a66ced594ad0063b088bf743be7ff962bbb5616. 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 --- src/libs/utils/synchronousprocess.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/libs/utils/synchronousprocess.cpp') diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp index 2d73283695..43a00ef1ee 100644 --- a/src/libs/utils/synchronousprocess.cpp +++ b/src/libs/utils/synchronousprocess.cpp @@ -89,27 +89,19 @@ static Q_LOGGING_CATEGORY(processLog, "qtc.utils.synchronousprocess", QtWarningM // A special QProcess derivative allowing for terminal control. class TerminalControllingProcess : public QProcess { public: - TerminalControllingProcess() - { -#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) && defined(Q_OS_UNIX) - setChildProcessModifier([this]() { maybeSetsid(); }); -#endif - } + TerminalControllingProcess() = default; unsigned flags() const { return m_flags; } void setFlags(unsigned tc) { m_flags = tc; } protected: - inline void maybeSetsid(); -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) && defined(Q_OS_UNIX) - void setupChildProcess() override { maybeSetsid(); } -#endif + void setupChildProcess() override; private: unsigned m_flags = 0; }; -inline void TerminalControllingProcess::maybeSetsid() +void TerminalControllingProcess::setupChildProcess() { #ifdef Q_OS_UNIX // Disable terminal by becoming a session leader. -- cgit v1.2.1