summaryrefslogtreecommitdiff
path: root/src/libs/utils/synchronousprocess.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-06-11 14:59:40 +0200
committerhjk <hjk@qt.io>2020-06-11 13:17:00 +0000
commitf2e06d276472c0138520e6f4b53df96d79163de5 (patch)
tree60d6855fbf27bcb7b5438535544570f0cd271bfa /src/libs/utils/synchronousprocess.cpp
parent9e4eafccd227b8d550e1f778f632322b5b3bb187 (diff)
downloadqt-creator-f2e06d276472c0138520e6f4b53df96d79163de5.tar.gz
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 <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/utils/synchronousprocess.cpp')
-rw-r--r--src/libs/utils/synchronousprocess.cpp14
1 files changed, 3 insertions, 11 deletions
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.