From 0cfe11a96065189225de69c1e8b3611121e578b7 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 13 Aug 2020 17:34:54 +0200 Subject: [PATCH] Ios: Use new AbstractProcessStep convenience functions Change-Id: I8a20690b679a4f2205295be48e4e5e99dee94d79 Reviewed-by: Eike Ziller --- src/plugins/ios/iosbuildstep.cpp | 15 +++++---------- src/plugins/ios/iosdsymbuildstep.cpp | 15 ++++----------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/plugins/ios/iosbuildstep.cpp b/src/plugins/ios/iosbuildstep.cpp index c7f61fb1970..941de55bcf4 100644 --- a/src/plugins/ios/iosbuildstep.cpp +++ b/src/plugins/ios/iosbuildstep.cpp @@ -171,11 +171,7 @@ private: void updateDetails() { ProcessParameters param; - param.setMacroExpander(m_buildStep->macroExpander()); - param.setWorkingDirectory(m_buildStep->buildDirectory()); - param.setEnvironment(m_buildStep->buildEnvironment()); - param.setCommandLine({m_buildStep->buildCommand(), m_buildStep->allArguments()}); - + m_buildStep->setupProcessParameters(¶m); setSummaryText(param.summary(displayName())); } @@ -191,6 +187,9 @@ IosBuildStep::IosBuildStep(BuildStepList *parent, Id id) { setDefaultDisplayName(tr("xcodebuild")); + setCommandLineProvider([this] { return CommandLine(buildCommand(), allArguments()); }); + setUseEnglishOutput(); + if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) { m_clean = true; setExtraArguments(QStringList("clean")); @@ -211,11 +210,7 @@ bool IosBuildStep::init() } ProcessParameters *pp = processParameters(); - pp->setMacroExpander(bc->macroExpander()); - pp->setWorkingDirectory(bc->buildDirectory()); - Utils::Environment env = bc->environment(); - Utils::Environment::setupEnglishOutput(&env); - pp->setEnvironment(env); + setupProcessParameters(pp); pp->setCommandLine({buildCommand(), allArguments()}); // If we are cleaning, then build can fail with an error code, but that doesn't mean diff --git a/src/plugins/ios/iosdsymbuildstep.cpp b/src/plugins/ios/iosdsymbuildstep.cpp index 3b11d069222..d0f8aa0fd9f 100644 --- a/src/plugins/ios/iosdsymbuildstep.cpp +++ b/src/plugins/ios/iosdsymbuildstep.cpp @@ -63,17 +63,14 @@ IosDsymBuildStep::IosDsymBuildStep(BuildStepList *parent, Id id) : AbstractProcessStep(parent, id), m_clean(parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) { + setCommandLineProvider([this] { return CommandLine(command(), arguments()); }); + setUseEnglishOutput(); } bool IosDsymBuildStep::init() { ProcessParameters *pp = processParameters(); - pp->setMacroExpander(macroExpander()); - pp->setWorkingDirectory(buildDirectory()); - Utils::Environment env = buildEnvironment(); - Utils::Environment::setupEnglishOutput(&env); - pp->setEnvironment(env); - pp->setCommandLine({command(), arguments()}); + setupProcessParameters(pp); // If we are cleaning, then build can fail with an error code, but that doesn't mean // we should stop the clean queue @@ -257,11 +254,7 @@ IosDsymBuildStepConfigWidget::~IosDsymBuildStepConfigWidget() void IosDsymBuildStepConfigWidget::updateDetails() { ProcessParameters param; - param.setMacroExpander(m_buildStep->macroExpander()); - param.setWorkingDirectory(m_buildStep->buildDirectory()); - param.setEnvironment(m_buildStep->buildEnvironment()); - param.setCommandLine({m_buildStep->command(), m_buildStep->arguments()}); - + m_buildStep->setupProcessParameters(¶m); setSummaryText(param.summary(displayName())); }