forked from qt-creator/qt-creator
Runner: Use Utils::SynchronousProcess::stopProcess
Change-Id: I77b0b039dae230c80a02f1692985c517bdd52023 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include "clangstaticanalyzerconstants.h"
|
#include "clangstaticanalyzerconstants.h"
|
||||||
|
|
||||||
|
#include <utils/synchronousprocess.h>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@@ -83,14 +85,7 @@ ClangStaticAnalyzerRunner::ClangStaticAnalyzerRunner(const QString &clangExecuta
|
|||||||
|
|
||||||
ClangStaticAnalyzerRunner::~ClangStaticAnalyzerRunner()
|
ClangStaticAnalyzerRunner::~ClangStaticAnalyzerRunner()
|
||||||
{
|
{
|
||||||
const QProcess::ProcessState processState = m_process.state();
|
Utils::SynchronousProcess::stopProcess(m_process);
|
||||||
if (processState == QProcess::Starting || processState == QProcess::Running) {
|
|
||||||
m_process.terminate();
|
|
||||||
if (!m_process.waitForFinished(500)) {
|
|
||||||
m_process.kill();
|
|
||||||
m_process.waitForFinished();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClangStaticAnalyzerRunner::run(const QString &filePath, const QStringList &compilerOptions)
|
bool ClangStaticAnalyzerRunner::run(const QString &filePath, const QStringList &compilerOptions)
|
||||||
|
Reference in New Issue
Block a user