forked from qt-creator/qt-creator
disable Ctrl-C stub in debug build
Activating the controlcstub in a debug build will send Ctrl-C to Qt Creator too, because he stub and Qt Creator share the same Windows. We're disabling the stub in debug builds. Cancelling a build still works but takes a bit longer. Task-number: QTCREATORBUG-11995 Change-Id: I766c2eac1f07205c411a7e4164e7d73b6c0441aa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
@@ -671,6 +671,16 @@ bool QtcProcess::prepareCommand(const QString &command, const QString &arguments
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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.
|
||||||
|
#ifndef QT_DEBUG
|
||||||
|
m_useCtrlCStub = enabled;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void QtcProcess::start()
|
void QtcProcess::start()
|
||||||
{
|
{
|
||||||
Environment env;
|
Environment env;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
{ m_environment = env; m_haveEnv = true; }
|
{ m_environment = env; m_haveEnv = true; }
|
||||||
void setCommand(const QString &command, const QString &arguments)
|
void setCommand(const QString &command, const QString &arguments)
|
||||||
{ m_command = command; m_arguments = arguments; }
|
{ m_command = command; m_arguments = arguments; }
|
||||||
void setUseCtrlCStub(bool enabled) { m_useCtrlCStub = enabled; }
|
void setUseCtrlCStub(bool enabled);
|
||||||
void start();
|
void start();
|
||||||
void terminate();
|
void terminate();
|
||||||
void interrupt();
|
void interrupt();
|
||||||
|
|||||||
Reference in New Issue
Block a user