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

@@ -497,7 +497,7 @@ void QbsBuildStep::handleProcessResult(
if (success && !hasOutput)
return;
emit addOutput(executable.toUserOutput() + ' ' + QtcProcess::joinArgs(arguments),
emit addOutput(executable.toUserOutput() + ' ' + ProcessArgs::joinArgs(arguments),
OutputFormat::Stdout);
for (const QString &line : stdErr)
emit addOutput(line, OutputFormat::Stderr);
@@ -774,7 +774,7 @@ void QbsBuildStepConfigWidget::updatePropertyEdit(const QVariantMap &data)
for (QVariantMap::const_iterator i = editable.constBegin(); i != editable.constEnd(); ++i)
propertyList.append(i.key() + ':' + i.value().toString());
propertyEdit->setText(QtcProcess::joinArgs(propertyList));
propertyEdit->setText(ProcessArgs::joinArgs(propertyList));
}
void QbsBuildStep::changeBuildVariant()
@@ -851,10 +851,9 @@ QbsBuildStep *QbsBuildStepConfigWidget::qbsStep() const
bool QbsBuildStepConfigWidget::validateProperties(Utils::FancyLineEdit *edit, QString *errorMessage)
{
Utils::QtcProcess::SplitError err;
QStringList argList = Utils::QtcProcess::splitArgs(edit->text(), Utils::HostOsInfo::hostOs(),
false, &err);
if (err != Utils::QtcProcess::SplitOk) {
ProcessArgs::SplitError err;
QStringList argList = ProcessArgs::splitArgs(edit->text(), HostOsInfo::hostOs(), false, &err);
if (err != ProcessArgs::SplitOk) {
if (errorMessage)
*errorMessage = tr("Could not split properties.");
return false;