diff options
author | Sergey Morozov <dev@gres.biz> | 2018-09-22 14:22:03 +0300 |
---|---|---|
committer | Sergey Morozov <dev@gres.biz> | 2018-09-30 07:38:40 +0000 |
commit | f01ee04f4fa1334ca6e2dcc6c31289676f98d1b1 (patch) | |
tree | 29dff91cf47e81cb518ac4ca31f964751b7e7261 /src/plugins/cppcheck/cppcheckrunner.cpp | |
parent | 546956a302d7a91006460b55e699e1b832b02a3d (diff) | |
download | qt-creator-f01ee04f4fa1334ca6e2dcc6c31289676f98d1b1.tar.gz |
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>
Diffstat (limited to 'src/plugins/cppcheck/cppcheckrunner.cpp')
-rw-r--r-- | src/plugins/cppcheck/cppcheckrunner.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/cppcheck/cppcheckrunner.cpp b/src/plugins/cppcheck/cppcheckrunner.cpp index b1d5f1b6c6..c747258838 100644 --- a/src/plugins/cppcheck/cppcheckrunner.cpp +++ b/src/plugins/cppcheck/cppcheckrunner.cpp @@ -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(); } |