forked from qt-creator/qt-creator
Utils: Adapt ProcessHelper to move to Qt 6.2
And move constructor out-of-line. Change-Id: Iab92dbef56d60f2ec2d19b778fd968834dd72766 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -110,6 +110,14 @@ BOOL CALLBACK sendInterruptMessageToAllWindowsOfProcess_enumWnd(HWND hwnd, LPARA
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ProcessHelper::ProcessHelper(QObject *parent)
|
||||||
|
: QProcess(parent), m_processStartHandler(this)
|
||||||
|
{
|
||||||
|
#if defined(Q_OS_UNIX)
|
||||||
|
setChildProcessModifier([this] { setupChildProcess_impl(); });
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void ProcessHelper::setUseCtrlCStub(bool enabled)
|
void ProcessHelper::setUseCtrlCStub(bool enabled)
|
||||||
{
|
{
|
||||||
m_useCtrlCStub = enabled;
|
m_useCtrlCStub = enabled;
|
||||||
|
@@ -32,7 +32,8 @@
|
|||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
class ProcessStartHandler {
|
class ProcessStartHandler
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
ProcessStartHandler(QProcess *process) : m_process(process) {}
|
ProcessStartHandler(QProcess *process) : m_process(process) {}
|
||||||
|
|
||||||
@@ -55,16 +56,7 @@ class ProcessHelper : public QProcess
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ProcessHelper(QObject *parent) : QProcess(parent), m_processStartHandler(this)
|
explicit ProcessHelper(QObject *parent);
|
||||||
{
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && defined(Q_OS_UNIX)
|
|
||||||
setChildProcessModifier([this] { setupChildProcess_impl(); });
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
void setupChildProcess() override { setupChildProcess_impl(); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ProcessStartHandler *processStartHandler() { return &m_processStartHandler; }
|
ProcessStartHandler *processStartHandler() { return &m_processStartHandler; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user