forked from qt-creator/qt-creator
ProjectExplorer: Simplify use of AbstractProcessStep::init()
1. Systematically check for AbstractProcessStep::init() first in derived classes. 2. Use setupProcessParameters(processParameters()); by default in the base implementation. 3. Drop all re-implementations that are effectively the same. Change-Id: I0ae54dd4909b354672a63ee56d0b7c2ea0732494 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -499,6 +499,9 @@ AndroidBuildApkStep::AndroidBuildApkStep(BuildStepList *parent, Utils::Id id)
|
||||
|
||||
bool AndroidBuildApkStep::init()
|
||||
{
|
||||
if (!AbstractProcessStep::init())
|
||||
return false;
|
||||
|
||||
if (m_signPackage) {
|
||||
qCDebug(buildapkstepLog) << "Signing enabled";
|
||||
// check keystore and certificate passwords
|
||||
@@ -566,9 +569,6 @@ bool AndroidBuildApkStep::init()
|
||||
|
||||
qCDebug(buildapkstepLog) << "APK or AAB path:" << m_packagePath;
|
||||
|
||||
if (!AbstractProcessStep::init())
|
||||
return false;
|
||||
|
||||
QString command = version->hostBinPath().toString();
|
||||
if (!command.endsWith('/'))
|
||||
command += '/';
|
||||
@@ -631,9 +631,7 @@ bool AndroidBuildApkStep::init()
|
||||
arguments << "--no-gdbserver";
|
||||
}
|
||||
|
||||
ProjectExplorer::ProcessParameters *pp = processParameters();
|
||||
setupProcessParameters(pp);
|
||||
pp->setCommandLine({command, arguments});
|
||||
processParameters()->setCommandLine({command, arguments});
|
||||
|
||||
// Generate arguments with keystore password concealed
|
||||
ProjectExplorer::ProcessParameters pp2;
|
||||
|
||||
Reference in New Issue
Block a user