forked from qt-creator/qt-creator
Utils: Remove Debug restriction for useCtrlCStub
process_ctrlc_stub doesn't generate a Ctrl+C event sent via GenerateConsoleCtrlEvent for the child process to terminate. So the Debug restriction to workaround QTCREATORBUG-11995 is no longer needed. Change-Id: Iafc8b51bce17432c80b0be0c4084978abc1c909f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -58,7 +58,7 @@ public:
|
|||||||
bool m_runAsRoot = false;
|
bool m_runAsRoot = false;
|
||||||
bool m_lowPriority = false;
|
bool m_lowPriority = false;
|
||||||
bool m_unixTerminalDisabled = false;
|
bool m_unixTerminalDisabled = false;
|
||||||
bool m_useCtrlCStub = false; // release only
|
bool m_useCtrlCStub = false;
|
||||||
bool m_belowNormalPriority = false; // internal, dependent on other fields and specific code path
|
bool m_belowNormalPriority = false; // internal, dependent on other fields and specific code path
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -112,14 +112,7 @@ BOOL CALLBACK sendInterruptMessageToAllWindowsOfProcess_enumWnd(HWND hwnd, LPARA
|
|||||||
|
|
||||||
void ProcessHelper::setUseCtrlCStub(bool enabled)
|
void ProcessHelper::setUseCtrlCStub(bool enabled)
|
||||||
{
|
{
|
||||||
// Do not use the stub in debug mode. Activating the stub will shut down
|
|
||||||
// Qt Creator otherwise, because they share the same Windows console.
|
|
||||||
// See QTCREATORBUG-11995 for details.
|
|
||||||
#ifdef QT_DEBUG
|
|
||||||
Q_UNUSED(enabled)
|
|
||||||
#else
|
|
||||||
m_useCtrlCStub = enabled;
|
m_useCtrlCStub = enabled;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcessHelper::terminateProcess()
|
void ProcessHelper::terminateProcess()
|
||||||
|
@@ -85,7 +85,7 @@ private:
|
|||||||
|
|
||||||
bool m_lowPriority = false;
|
bool m_lowPriority = false;
|
||||||
bool m_unixTerminalDisabled = false;
|
bool m_unixTerminalDisabled = false;
|
||||||
bool m_useCtrlCStub = false; // release only
|
bool m_useCtrlCStub = false;
|
||||||
ProcessStartHandler m_processStartHandler;
|
ProcessStartHandler m_processStartHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1059,14 +1059,7 @@ void QtcProcess::setWorkingDirectory(const FilePath &dir)
|
|||||||
|
|
||||||
void QtcProcess::setUseCtrlCStub(bool enabled)
|
void QtcProcess::setUseCtrlCStub(bool enabled)
|
||||||
{
|
{
|
||||||
// Do not use the stub in debug mode. Activating the stub will shut down
|
|
||||||
// Qt Creator otherwise, because they share the same Windows console.
|
|
||||||
// See QTCREATORBUG-11995 for details.
|
|
||||||
#ifdef QT_DEBUG
|
|
||||||
Q_UNUSED(enabled)
|
|
||||||
#else
|
|
||||||
d->m_setup.m_useCtrlCStub = enabled;
|
d->m_setup.m_useCtrlCStub = enabled;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtcProcess::start()
|
void QtcProcess::start()
|
||||||
|
Reference in New Issue
Block a user