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

@@ -199,26 +199,26 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
const QmlBuildSystem *bs = qobject_cast<QmlBuildSystem *>(target()->buildSystem());
foreach (const QString &importPath,
QmlBuildSystem::makeAbsolute(bs->targetDirectory(), bs->customImportPaths())) {
QtcProcess::addArg(&args, "-I", osType);
QtcProcess::addArg(&args, importPath, osType);
ProcessArgs::addArg(&args, "-I", osType);
ProcessArgs::addArg(&args, importPath, osType);
}
for (const QString &fileSelector : bs->customFileSelectors()) {
QtcProcess::addArg(&args, "-S", osType);
QtcProcess::addArg(&args, fileSelector, osType);
ProcessArgs::addArg(&args, "-S", osType);
ProcessArgs::addArg(&args, fileSelector, osType);
}
if (Utils::HostOsInfo::isWindowsHost() && bs->forceFreeType()) {
Utils::QtcProcess::addArg(&args, "-platform", osType);
Utils::QtcProcess::addArg(&args, "windows:fontengine=freetype", osType);
if (HostOsInfo::isWindowsHost() && bs->forceFreeType()) {
ProcessArgs::addArg(&args, "-platform", osType);
ProcessArgs::addArg(&args, "windows:fontengine=freetype", osType);
}
const QString main = bs->targetFile(FilePath::fromString(mainScript())).toString();
if (!main.isEmpty())
QtcProcess::addArg(&args, main, osType);
ProcessArgs::addArg(&args, main, osType);
if (m_multiLanguageAspect && m_multiLanguageAspect->value())
QtcProcess::addArg(&args, "-qmljsdebugger=file:unused_if_debugger_arguments_added,services:DebugTranslation", osType);
ProcessArgs::addArg(&args, "-qmljsdebugger=file:unused_if_debugger_arguments_added,services:DebugTranslation", osType);
return args;
}