From 9d5bc2b8c60551c9b9cdddd0453283300adcdd10 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 24 May 2022 17:36:42 +0200 Subject: [PATCH] Qt6: hide setupChildProcess --- src/utils/childproc.cpp | 4 +++- src/utils/childproc.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/childproc.cpp b/src/utils/childproc.cpp index 671b1b4..a569060 100644 --- a/src/utils/childproc.cpp +++ b/src/utils/childproc.cpp @@ -6,9 +6,11 @@ ChildProcess::ChildProcess(QObject* parent) {} ChildProcess::~ChildProcess() {} +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) void ChildProcess::setupChildProcess() { #if defined(HAVE_SYS_PRCTL_H) && defined(Q_OS_UNIX) // https://smackerelofopinion.blogspot.com/2015/11/using-prsetpdeathsig-to-reap-child.html ::prctl(PR_SET_PDEATHSIG, SIGKILL); #endif -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/utils/childproc.h b/src/utils/childproc.h index 89ba2aa..6b87e1a 100644 --- a/src/utils/childproc.h +++ b/src/utils/childproc.h @@ -17,7 +17,9 @@ public: explicit ChildProcess(QObject* parent = nullptr); ~ChildProcess() override; protected: +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) void setupChildProcess() override; +#endif };