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

@@ -46,17 +46,16 @@ QnxDeviceProcess::QnxDeviceProcess(const QSharedPointer<const IDevice> &device,
QString QnxDeviceProcess::fullCommandLine(const Runnable &runnable) const
{
QStringList args = QtcProcess::splitArgs(runnable.commandLineArguments);
QStringList args = ProcessArgs::splitArgs(runnable.commandLineArguments);
args.prepend(runnable.executable.toString());
QString cmd = QtcProcess::Arguments::createUnixArgs(args).toString();
QString cmd = ProcessArgs::createUnixArgs(args).toString();
QString fullCommandLine = QLatin1String(
QString fullCommandLine =
"test -f /etc/profile && . /etc/profile ; "
"test -f $HOME/profile && . $HOME/profile ; "
);
"test -f $HOME/profile && . $HOME/profile ; ";
if (!runnable.workingDirectory.isEmpty())
fullCommandLine += QString::fromLatin1("cd %1 ; ").arg(QtcProcess::quoteArg(runnable.workingDirectory));
fullCommandLine += QString::fromLatin1("cd %1 ; ").arg(ProcessArgs::quoteArg(runnable.workingDirectory));
const Environment env = runnable.environment;
for (auto it = env.constBegin(); it != env.constEnd(); ++it) {