forked from qt-creator/qt-creator
CMakeProjectManager: Kill cmake process on cancel instead of waiting
Instead of waiting until the timeout is hit, calling CMakeTool::cancel should kill the process. The output of the process is not required in that case. Otherwise when having multiple cmake instances startup of QtC and using the settingsdialog can be slow. Change-Id: I1013f69f72171304ddf8ff3dc4fce9a7cddc6758 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -85,6 +85,10 @@ void CMakeTool::cancel()
|
|||||||
{
|
{
|
||||||
if (m_process) {
|
if (m_process) {
|
||||||
disconnect(m_process, SIGNAL(finished(int)));
|
disconnect(m_process, SIGNAL(finished(int)));
|
||||||
|
|
||||||
|
if (m_process->state() != QProcess::NotRunning)
|
||||||
|
m_process->kill();
|
||||||
|
|
||||||
m_process->waitForFinished();
|
m_process->waitForFinished();
|
||||||
delete m_process;
|
delete m_process;
|
||||||
m_process = 0;
|
m_process = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user