Commit 79f82d0d authored by Tobias Hunger's avatar Tobias Hunger
Browse files

BuildManager: Provide context of earlier build steps to init



This information can be used to get information from earlier steps,
which e.g. queried for android devices to deploy to.

Change-Id: Iefe1c9443915cb6211f86f98ff7aaf3cb75145ba
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent cedf015c
......@@ -97,7 +97,7 @@ AndroidBuildApkStep::AndroidBuildApkStep(ProjectExplorer::BuildStepList *parent,
}
}
bool AndroidBuildApkStep::init()
bool AndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
{
ProjectExplorer::BuildConfiguration *bc = buildConfiguration();
......@@ -132,7 +132,7 @@ bool AndroidBuildApkStep::init()
m_openPackageLocationForRun = m_openPackageLocation;
m_apkPath = AndroidManager::androidQtSupport(target())->apkPath(target()).toString();
bool result = AbstractProcessStep::init();
bool result = AbstractProcessStep::init(earlierSteps);
if (!result)
return false;
......
......@@ -97,7 +97,7 @@ protected:
bool keystorePassword();
bool certificatePassword();
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override { return true; }
void processFinished(int exitCode, QProcess::ExitStatus status) override;
......
......@@ -166,8 +166,9 @@ void AndroidDeployQtStep::ctor()
this, &AndroidDeployQtStep::slotSetSerialNumber);
}
bool AndroidDeployQtStep::init()
bool AndroidDeployQtStep::init(QList<const BuildStep *> &earlierSteps)
{
Q_UNUSED(earlierSteps);
m_androiddeployqtArgs.clear();
if (AndroidManager::checkForQt51Files(project()->projectDirectory()))
......
......@@ -103,7 +103,7 @@ private:
void ctor();
void runCommand(const QString &program, const QStringList &arguments);
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &fi) override;
enum DeployResult { Success, Failure, AskUinstall };
DeployResult runDeploy(QFutureInterface<bool> &fi);
......
......@@ -152,7 +152,7 @@ void AutogenStep::ctor()
setDefaultDisplayName(tr("Autogen"));
}
bool AutogenStep::init()
bool AutogenStep::init(QList<const BuildStep *> &earlierSteps)
{
BuildConfiguration *bc = buildConfiguration();
......@@ -165,7 +165,7 @@ bool AutogenStep::init()
pp->setArguments(additionalArguments());
pp->resolveAll();
return AbstractProcessStep::init();
return AbstractProcessStep::init(earlierSteps);
}
void AutogenStep::run(QFutureInterface<bool> &interface)
......
......@@ -96,7 +96,7 @@ class AutogenStep : public ProjectExplorer::AbstractProcessStep
public:
explicit AutogenStep(ProjectExplorer::BuildStepList *bsl);
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &interface) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override;
......
......@@ -151,7 +151,7 @@ void AutoreconfStep::ctor()
setDefaultDisplayName(tr("Autoreconf"));
}
bool AutoreconfStep::init()
bool AutoreconfStep::init(QList<const BuildStep *> &earlierSteps)
{
BuildConfiguration *bc = buildConfiguration();
......@@ -164,7 +164,7 @@ bool AutoreconfStep::init()
pp->setArguments(additionalArguments());
pp->resolveAll();
return AbstractProcessStep::init();
return AbstractProcessStep::init(earlierSteps);
}
void AutoreconfStep::run(QFutureInterface<bool> &interface)
......
......@@ -96,7 +96,7 @@ class AutoreconfStep : public ProjectExplorer::AbstractProcessStep
public:
explicit AutoreconfStep(ProjectExplorer::BuildStepList *bsl);
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &interface) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override;
......
......@@ -166,7 +166,7 @@ void ConfigureStep::ctor()
setDefaultDisplayName(tr("Configure"));
}
bool ConfigureStep::init()
bool ConfigureStep::init(QList<const BuildStep *> &earlierSteps)
{
BuildConfiguration *bc = buildConfiguration();
......@@ -178,7 +178,7 @@ bool ConfigureStep::init()
pp->setArguments(additionalArguments());
pp->resolveAll();
return AbstractProcessStep::init();
return AbstractProcessStep::init(earlierSteps);
}
void ConfigureStep::run(QFutureInterface<bool>& interface)
......
......@@ -95,7 +95,7 @@ class ConfigureStep : public ProjectExplorer::AbstractProcessStep
public:
explicit ConfigureStep(ProjectExplorer::BuildStepList *bsl);
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &interface) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override;
......
......@@ -160,7 +160,7 @@ void MakeStep::setClean(bool clean)
m_clean = clean;
}
bool MakeStep::init()
bool MakeStep::init(QList<const BuildStep *> &earlierSteps)
{
BuildConfiguration *bc = buildConfiguration();
if (!bc)
......@@ -200,7 +200,7 @@ bool MakeStep::init()
appendOutputParser(parser);
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
return AbstractProcessStep::init();
return AbstractProcessStep::init(earlierSteps);
}
void MakeStep::run(QFutureInterface<bool> &interface)
......
......@@ -94,7 +94,7 @@ class MakeStep : public ProjectExplorer::AbstractProcessStep
public:
explicit MakeStep(ProjectExplorer::BuildStepList *bsl);
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &interface) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
void setClean(bool clean);
......
......@@ -132,8 +132,9 @@ QString BareMetalGdbCommandsDeployStep::gdbCommands() const
return m_gdbCommands;
}
bool BareMetalGdbCommandsDeployStep::init()
bool BareMetalGdbCommandsDeployStep::init(QList<const BuildStep *> &earlierSteps)
{
Q_UNUSED(earlierSteps);
return true;
}
......
......@@ -48,7 +48,7 @@ public:
BareMetalGdbCommandsDeployStep(ProjectExplorer::BuildStepList *bsl,
BareMetalGdbCommandsDeployStep *other);
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &fi) override;
bool runInGuiThread() const override { return true;}
......
......@@ -174,7 +174,7 @@ bool MakeStep::fromMap(const QVariantMap &map)
}
bool MakeStep::init()
bool MakeStep::init(QList<const BuildStep *> &earlierSteps)
{
CMakeBuildConfiguration *bc = cmakeBuildConfiguration();
if (!bc)
......@@ -219,7 +219,7 @@ bool MakeStep::init()
appendOutputParser(parser);
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
return AbstractProcessStep::init();
return AbstractProcessStep::init(earlierSteps);
}
void MakeStep::run(QFutureInterface<bool> &fi)
......
......@@ -59,7 +59,7 @@ public:
CMakeBuildConfiguration *cmakeBuildConfiguration() const;
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &fi) override;
......
......@@ -94,7 +94,7 @@ void GenericMakeStep::ctor()
GENERIC_MS_DISPLAY_NAME));
}
bool GenericMakeStep::init()
bool GenericMakeStep::init(QList<const BuildStep *> &earlierSteps)
{
BuildConfiguration *bc = buildConfiguration();
if (!bc)
......@@ -134,7 +134,7 @@ bool GenericMakeStep::init()
appendOutputParser(parser);
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
return AbstractProcessStep::init();
return AbstractProcessStep::init(earlierSteps);
}
void GenericMakeStep::setClean(bool clean)
......
......@@ -54,7 +54,7 @@ class GenericMakeStep : public ProjectExplorer::AbstractProcessStep
public:
explicit GenericMakeStep(ProjectExplorer::BuildStepList *parent);
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &fi) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
......
......@@ -95,7 +95,7 @@ void IosBuildStep::ctor()
IOS_BUILD_STEP_DISPLAY_NAME));
}
bool IosBuildStep::init()
bool IosBuildStep::init(QList<const BuildStep *> &earlierSteps)
{
BuildConfiguration *bc = buildConfiguration();
if (!bc)
......@@ -135,7 +135,7 @@ bool IosBuildStep::init()
appendOutputParser(parser);
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
return AbstractProcessStep::init();
return AbstractProcessStep::init(earlierSteps);
}
void IosBuildStep::setClean(bool clean)
......
......@@ -53,7 +53,7 @@ class IosBuildStep : public ProjectExplorer::AbstractProcessStep
public:
explicit IosBuildStep(ProjectExplorer::BuildStepList *parent);
bool init() override;
bool init(QList<const BuildStep *> &earlierSteps) override;
void run(QFutureInterface<bool> &fi) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment