forked from qt-creator/qt-creator
ClangTools: Add automatic clang tool runner for open documents
Fixes: QTCREATORBUG-23349 Change-Id: I81197180c9d69c7df6184f8fcbf05f2256eaf7f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -75,7 +75,15 @@ void ClangToolRunner::init(const QString &outputDirPath,
|
||||
|
||||
ClangToolRunner::~ClangToolRunner()
|
||||
{
|
||||
Utils::SynchronousProcess::stopProcess(m_process);
|
||||
if (m_process.state() != QProcess::NotRunning) {
|
||||
// asking politly to terminate costs ~300 ms on windows so skip the courtasy and direct kill the process
|
||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||
m_process.kill();
|
||||
m_process.waitForFinished(100);
|
||||
} else {
|
||||
Utils::SynchronousProcess::stopProcess(m_process);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static QString createOutputFilePath(const QString &dirPath, const QString &fileToAnalyze)
|
||||
|
||||
Reference in New Issue
Block a user