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:
Benjamin Zeller
2015-03-10 15:29:43 +01:00
parent cd3238cead
commit adf70c1a84

View File

@@ -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;