From 8be05ca7457556b5c086cd6c454bd0dc3c697aa7 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 11 May 2022 13:25:37 +0200 Subject: [PATCH] Utils: Remove Debug restriction for useCtrlCStub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Reviewed-by: Orgad Shaneh --- src/libs/utils/processinterface.h | 2 +- src/libs/utils/processutils.cpp | 7 ------- src/libs/utils/processutils.h | 2 +- src/libs/utils/qtcprocess.cpp | 7 ------- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/libs/utils/processinterface.h b/src/libs/utils/processinterface.h index 37709be47d9..e97efeb84cb 100644 --- a/src/libs/utils/processinterface.h +++ b/src/libs/utils/processinterface.h @@ -58,7 +58,7 @@ public: bool m_runAsRoot = false; bool m_lowPriority = 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 }; diff --git a/src/libs/utils/processutils.cpp b/src/libs/utils/processutils.cpp index 3c1f982e4b0..3019bcd2c82 100644 --- a/src/libs/utils/processutils.cpp +++ b/src/libs/utils/processutils.cpp @@ -112,14 +112,7 @@ BOOL CALLBACK sendInterruptMessageToAllWindowsOfProcess_enumWnd(HWND hwnd, LPARA 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; -#endif } void ProcessHelper::terminateProcess() diff --git a/src/libs/utils/processutils.h b/src/libs/utils/processutils.h index a9ae590ed26..0ffa8117472 100644 --- a/src/libs/utils/processutils.h +++ b/src/libs/utils/processutils.h @@ -85,7 +85,7 @@ private: bool m_lowPriority = false; bool m_unixTerminalDisabled = false; - bool m_useCtrlCStub = false; // release only + bool m_useCtrlCStub = false; ProcessStartHandler m_processStartHandler; }; diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp index b37754ae1cc..59d8563ab73 100644 --- a/src/libs/utils/qtcprocess.cpp +++ b/src/libs/utils/qtcprocess.cpp @@ -1059,14 +1059,7 @@ void QtcProcess::setWorkingDirectory(const FilePath &dir) 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; -#endif } void QtcProcess::start()