forked from qt-creator/qt-creator
AbstractProcessStep: De-virtualize finish() method
Provide a setDoneHook() setter instead. The hook is introduced temporarily, as when all the subclasses are transformed to use the task tree, the done hook is going to be a part of the subclass' recipe. Task-number: QTCREATORBUG-29168 Change-Id: Idbc0f8b8a32c8df2fa5ecb73ed1cbaedad99620d Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -253,6 +253,11 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) :
|
||||
|
||||
connect(target(), &Target::activeRunConfigurationChanged,
|
||||
this, &CMakeBuildStep::updateBuildTargetsModel);
|
||||
|
||||
setDoneHook([this](bool) {
|
||||
updateDeploymentData();
|
||||
emit progress(100, {});
|
||||
});
|
||||
}
|
||||
|
||||
QVariantMap CMakeBuildStep::toMap() const
|
||||
@@ -795,14 +800,6 @@ void CMakeBuildStep::updateDeploymentData()
|
||||
buildSystem()->setDeploymentData(deploymentData);
|
||||
}
|
||||
|
||||
void CMakeBuildStep::finish(ProcessResult result)
|
||||
{
|
||||
updateDeploymentData();
|
||||
|
||||
emit progress(100, {});
|
||||
AbstractProcessStep::finish(result);
|
||||
}
|
||||
|
||||
// CMakeBuildStepFactory
|
||||
|
||||
CMakeBuildStepFactory::CMakeBuildStepFactory()
|
||||
|
||||
@@ -77,7 +77,6 @@ signals:
|
||||
private:
|
||||
Utils::CommandLine cmakeCommand() const;
|
||||
|
||||
void finish(Utils::ProcessResult result) override;
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
|
||||
bool init() override;
|
||||
|
||||
@@ -38,13 +38,12 @@ public:
|
||||
cmakeArguments.setDisplayStyle(StringAspect::LineEditDisplay);
|
||||
|
||||
setCommandLineProvider([this] { return cmakeCommand(); });
|
||||
setDoneHook([this](bool) { emit progress(100, {}); });
|
||||
}
|
||||
|
||||
private:
|
||||
CommandLine cmakeCommand() const;
|
||||
|
||||
void finish(ProcessResult result) override;
|
||||
|
||||
void setupOutputFormatter(OutputFormatter *formatter) override;
|
||||
QWidget *createConfigWidget() override;
|
||||
|
||||
@@ -83,12 +82,6 @@ CommandLine CMakeInstallStep::cmakeCommand() const
|
||||
return cmd;
|
||||
}
|
||||
|
||||
void CMakeInstallStep::finish(ProcessResult result)
|
||||
{
|
||||
emit progress(100, {});
|
||||
AbstractProcessStep::finish(result);
|
||||
}
|
||||
|
||||
QWidget *CMakeInstallStep::createConfigWidget()
|
||||
{
|
||||
auto updateDetails = [this] {
|
||||
|
||||
Reference in New Issue
Block a user