Utils: Rename cmd parameter to args in prepareArgs

That's what it is.

Change-Id: I45fa1de000cdd25990d3e292bc129a8a12af65c6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2021-08-03 09:21:15 +02:00
parent 0567f35e21
commit c3077fde55
2 changed files with 5 additions and 6 deletions

View File

@@ -588,8 +588,8 @@ static QString quoteArgWin(const QString &arg)
return ret; return ret;
} }
ProcessArgs ProcessArgs::prepareArgs(const QString &cmd, SplitError *err, OsType osType, ProcessArgs ProcessArgs::prepareArgs(const QString &args, SplitError *err, OsType osType,
const Environment *env, const FilePath *pwd, bool abortOnMeta) const Environment *env, const FilePath *pwd, bool abortOnMeta)
{ {
QString wdcopy; QString wdcopy;
QString *wd = nullptr; QString *wd = nullptr;
@@ -599,9 +599,9 @@ ProcessArgs ProcessArgs::prepareArgs(const QString &cmd, SplitError *err, OsType
} }
ProcessArgs res; ProcessArgs res;
if (osType == OsTypeWindows) if (osType == OsTypeWindows)
res = prepareArgsWin(cmd, err, env, wd); res = prepareArgsWin(args, err, env, wd);
else else
res = createUnixArgs(splitArgs(cmd, osType, abortOnMeta, err, env, wd)); res = createUnixArgs(splitArgs(args, osType, abortOnMeta, err, env, wd));
return res; return res;
} }

View File

@@ -63,8 +63,7 @@ public:
//! Join an argument list into a shell command //! Join an argument list into a shell command
static QString joinArgs(const QStringList &args, OsType osType = HostOsInfo::hostOs()); static QString joinArgs(const QStringList &args, OsType osType = HostOsInfo::hostOs());
//! Prepare argument of a shell command for feeding into QProcess //! Prepare argument of a shell command for feeding into QProcess
static ProcessArgs prepareArgs(const QString &cmd, SplitError *err, static ProcessArgs prepareArgs(const QString &args, SplitError *err, OsType osType,
OsType osType = HostOsInfo::hostOs(),
const Environment *env = nullptr, const FilePath *pwd = nullptr, const Environment *env = nullptr, const FilePath *pwd = nullptr,
bool abortOnMeta = true); bool abortOnMeta = true);
//! Prepare a shell command for feeding into QProcess //! Prepare a shell command for feeding into QProcess