Utils: Move process arguments class out of QtcProcess

The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-05-06 13:07:36 +02:00
parent 8aafe36d01
commit f2f40efa03
62 changed files with 437 additions and 438 deletions

View File

@@ -161,10 +161,10 @@ QString ProcessParameters::prettyArguments() const
{
QString margs = effectiveArguments();
QString workDir = effectiveWorkingDirectory().toString();
QtcProcess::SplitError err;
QtcProcess::Arguments args =
QtcProcess::prepareArgs(margs, &err, HostOsInfo::hostOs(), &m_environment, &workDir);
if (err != QtcProcess::SplitOk)
ProcessArgs::SplitError err;
ProcessArgs args =
ProcessArgs::prepareArgs(margs, &err, HostOsInfo::hostOs(), &m_environment, &workDir);
if (err != ProcessArgs::SplitOk)
return margs; // Sorry, too complex - just fall back.
return args.toString();
}
@@ -184,7 +184,7 @@ QString ProcessParameters::summary(const QString &displayName) const
return QString::fromLatin1("<b>%1:</b> %2 %3")
.arg(displayName,
QtcProcess::quoteArg(prettyCommand()),
ProcessArgs::quoteArg(prettyCommand()),
prettyArguments());
}
@@ -195,7 +195,7 @@ QString ProcessParameters::summaryInWorkdir(const QString &displayName) const
return QString::fromLatin1("<b>%1:</b> %2 %3 in %4")
.arg(displayName,
QtcProcess::quoteArg(prettyCommand()),
ProcessArgs::quoteArg(prettyCommand()),
prettyArguments(),
QDir::toNativeSeparators(effectiveWorkingDirectory().toString()));
}