From adf70c1a84a92a4913b75c2347161317d093260d Mon Sep 17 00:00:00 2001 From: Benjamin Zeller Date: Tue, 10 Mar 2015 15:29:43 +0100 Subject: [PATCH] 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 --- src/plugins/cmakeprojectmanager/cmaketool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index 7a25bde4b8a..ebc14a29aa8 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -85,6 +85,10 @@ void CMakeTool::cancel() { if (m_process) { disconnect(m_process, SIGNAL(finished(int))); + + if (m_process->state() != QProcess::NotRunning) + m_process->kill(); + m_process->waitForFinished(); delete m_process; m_process = 0;