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:
@@ -91,6 +91,9 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(BuildStepList *bs
|
||||
|
||||
bool AndroidPackageInstallationStep::init()
|
||||
{
|
||||
if (!AbstractProcessStep::init())
|
||||
return false;
|
||||
|
||||
ToolChain *tc = ToolChainKitAspect::cxxToolChain(kit());
|
||||
QTC_ASSERT(tc, return false);
|
||||
|
||||
@@ -101,16 +104,14 @@ bool AndroidPackageInstallationStep::init()
|
||||
CommandLine cmd{tc->makeCommand(buildEnvironment())};
|
||||
cmd.addArgs(outerQuoted + " install", CommandLine::Raw);
|
||||
|
||||
ProcessParameters *pp = processParameters();
|
||||
setupProcessParameters(pp);
|
||||
pp->setCommandLine(cmd);
|
||||
processParameters()->setCommandLine(cmd);
|
||||
|
||||
m_androidDirsToClean.clear();
|
||||
// don't remove gradle's cache, it takes ages to rebuild it.
|
||||
m_androidDirsToClean << dirPath + "/assets";
|
||||
m_androidDirsToClean << dirPath + "/libs";
|
||||
|
||||
return AbstractProcessStep::init();
|
||||
return true;
|
||||
}
|
||||
|
||||
QString AndroidPackageInstallationStep::nativeAndroidBuildPath() const
|
||||
|
Reference in New Issue
Block a user