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
|
||||
|
||||
ProcessHelper::ProcessHelper(QObject *parent)
|
||||
: QProcess(parent), m_processStartHandler(this)
|
||||
{
|
||||
#if defined(Q_OS_UNIX)
|
||||
setChildProcessModifier([this] { setupChildProcess_impl(); });
|
||||
#endif
|
||||
}
|
||||
|
||||
void ProcessHelper::setUseCtrlCStub(bool enabled)
|
||||
{
|
||||
m_useCtrlCStub = enabled;
|
||||
|
@@ -32,7 +32,8 @@
|
||||
|
||||
namespace Utils {
|
||||
|
||||
class ProcessStartHandler {
|
||||
class ProcessStartHandler
|
||||
{
|
||||
public:
|
||||
ProcessStartHandler(QProcess *process) : m_process(process) {}
|
||||
|
||||
@@ -55,16 +56,7 @@ class ProcessHelper : public QProcess
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ProcessHelper(QObject *parent) : QProcess(parent), m_processStartHandler(this)
|
||||
{
|
||||
#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
|
||||
explicit ProcessHelper(QObject *parent);
|
||||
|
||||
ProcessStartHandler *processStartHandler() { return &m_processStartHandler; }
|
||||
|
||||
|
Reference in New Issue
Block a user