CppCheck: Split QProcess::start command line manually

Qt6 removed the convenience function taking the whole command line.

Change-Id: I0b77eb15c6cd9cff25028dec4baf4a4a70eba83c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2020-05-01 08:23:30 +02:00
parent b18587742f
commit f11b00af7a

View File

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