Use QtcProcess in CppcheckRunner

Change-Id: I0b5f9956a20673acb44903b2e35564a8862810ae
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2021-11-02 13:41:58 +01:00
parent efdaeaba43
commit 6a51277f61

View File

@@ -42,8 +42,9 @@ CppcheckRunner::CppcheckRunner(CppcheckTool &tool) :
m_process(new Utils::QtcProcess(this))
{
if (Utils::HostOsInfo::hostOs() == Utils::OsTypeLinux) {
QProcess getConf;
getConf.start("getconf", {"ARG_MAX"});
QtcProcess getConf;
getConf.setCommand({"getconf", {"ARG_MAX"}});
getConf.start();
getConf.waitForFinished(2000);
const QByteArray argMax = getConf.readAllStandardOutput().replace("\n", "");
m_maxArgumentsLength = std::max(argMax.toInt(), m_maxArgumentsLength);