Android: Use new AbstractProcessStep convenience functions

Change-Id: I3fa4dcdd210f4c5d492217f2e3f1ceca353a4161
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-08-13 16:47:33 +02:00
parent 3416357f2e
commit 69ff17aa2d
2 changed files with 6 additions and 19 deletions

View File

@@ -86,18 +86,6 @@ const char KeystoreLocationKey[] = "KeystoreLocation";
const char BuildTargetSdkKey[] = "BuildTargetSdk";
const char VerboseOutputKey[] = "VerboseOutput";
static void setupProcessParameters(ProcessParameters *pp,
BuildStep *step,
const QStringList &arguments,
const QString &command)
{
pp->setMacroExpander(step->macroExpander());
pp->setWorkingDirectory(step->buildDirectory());
Utils::Environment env = step->buildEnvironment();
pp->setEnvironment(env);
pp->setCommandLine({command, arguments});
}
class PasswordInputDialog : public QDialog
{
Q_OBJECT
@@ -257,11 +245,13 @@ bool AndroidBuildApkStep::init()
}
ProjectExplorer::ProcessParameters *pp = processParameters();
Android::setupProcessParameters(pp, this, arguments, command);
setupProcessParameters(pp);
pp->setCommandLine({command, arguments});
// Generate arguments with keystore password concealed
ProjectExplorer::ProcessParameters pp2;
Android::setupProcessParameters(&pp2, this, argumentsPasswordConcealed, command);
setupProcessParameters(&pp2);
pp->setCommandLine({command, argumentsPasswordConcealed});
m_command = pp2.effectiveCommand().toString();
m_argumentsPasswordConcealed = pp2.prettyArguments();