forked from qt-creator/qt-creator
Cppcheck: Kill current check process only when needed
Kill only if it processes specified files Change-Id: I5dee99ec8aeaf3bf4d9dbf6aad195f54176170a2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -87,17 +87,19 @@ void CppcheckRunner::addToQueue(const Utils::FileNameList &files,
|
||||
}
|
||||
|
||||
if (m_isRunning) {
|
||||
if (existing == m_currentFiles)
|
||||
m_process->kill(); // Further processing in handleFinished
|
||||
stop(existing);
|
||||
return;
|
||||
}
|
||||
|
||||
m_queueTimer.start();
|
||||
}
|
||||
|
||||
void CppcheckRunner::stop()
|
||||
void CppcheckRunner::stop(const Utils::FileNameList &files)
|
||||
{
|
||||
if (m_isRunning)
|
||||
if (!m_isRunning)
|
||||
return;
|
||||
|
||||
if (files.isEmpty() || m_currentFiles == files)
|
||||
m_process->kill();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user