forked from qt-creator/qt-creator
ClangTools: Remove some use of SynchronousProcess
Change-Id: Ifaf8979f5e3d2799002322580c8cb6982c099921 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/qtcprocess.h>
|
|
||||||
#include <utils/synchronousprocess.h>
|
#include <utils/synchronousprocess.h>
|
||||||
#include <utils/temporaryfile.h>
|
#include <utils/temporaryfile.h>
|
||||||
|
|
||||||
@@ -59,7 +58,7 @@ static QString finishedWithBadExitCode(const QString &name, int exitCode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClangToolRunner::ClangToolRunner(QObject *parent)
|
ClangToolRunner::ClangToolRunner(QObject *parent)
|
||||||
: QObject(parent), m_process(new QProcess)
|
: QObject(parent), m_process(new Utils::QtcProcess)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ClangToolRunner::~ClangToolRunner()
|
ClangToolRunner::~ClangToolRunner()
|
||||||
@@ -70,7 +69,7 @@ ClangToolRunner::~ClangToolRunner()
|
|||||||
m_process->kill();
|
m_process->kill();
|
||||||
m_process->waitForFinished(100);
|
m_process->waitForFinished(100);
|
||||||
} else {
|
} else {
|
||||||
Utils::SynchronousProcess::stopProcess(*m_process);
|
m_process->stopProcess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +145,8 @@ bool ClangToolRunner::run(const QString &fileToAnalyze, const QStringList &compi
|
|||||||
m_commandLine = Utils::QtcProcess::joinArgs(QStringList(m_executable) + arguments);
|
m_commandLine = Utils::QtcProcess::joinArgs(QStringList(m_executable) + arguments);
|
||||||
|
|
||||||
qCDebug(LOG).noquote() << "Starting" << m_commandLine;
|
qCDebug(LOG).noquote() << "Starting" << m_commandLine;
|
||||||
m_process->start(m_executable, arguments);
|
m_process->setCommand({m_executable, arguments});
|
||||||
|
m_process->start();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,13 +27,10 @@
|
|||||||
|
|
||||||
#include "clangtoolslogfilereader.h"
|
#include "clangtoolslogfilereader.h"
|
||||||
|
|
||||||
#include <QString>
|
#include <utils/qtcprocess.h>
|
||||||
#include <QProcess>
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace Utils { class Environment; }
|
|
||||||
|
|
||||||
namespace ClangTools {
|
namespace ClangTools {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -83,7 +80,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_outputDirPath;
|
QString m_outputDirPath;
|
||||||
QProcess *m_process = nullptr;
|
Utils::QtcProcess *m_process = nullptr;
|
||||||
QByteArray m_processOutput;
|
QByteArray m_processOutput;
|
||||||
|
|
||||||
QString m_name;
|
QString m_name;
|
||||||
|
|||||||
Reference in New Issue
Block a user