RemoteLinux: Simplify AbstractPackaging and derived step

Change-Id: I1a9fc0947fcca358ce3e8ca24c6430bc973f131f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-06-25 16:53:40 +02:00
parent ce4f57a01c
commit c39f2866c7
4 changed files with 9 additions and 44 deletions

View File

@@ -82,6 +82,14 @@ TarPackageCreationStep::TarPackageCreationStep(BuildStepList *bsl)
m_incrementalDeploymentAspect = addAspect<BaseBoolAspect>();
m_incrementalDeploymentAspect->setLabel(tr("Package modified files only"));
m_incrementalDeploymentAspect->setSettingsKey(IncrementalDeploymentKey);
setSummaryUpdater([this] {
QString path = packageFilePath();
if (path.isEmpty())
return QString("<font color=\"red\">" + tr("Tarball creation not possible.")
+ "</font>");
return QString("<b>" + tr("Create tarball:") + "</b> " + path);
});
}
bool TarPackageCreationStep::init()
@@ -344,29 +352,6 @@ bool TarPackageCreationStep::runImpl()
return success;
}
BuildStepConfigWidget *TarPackageCreationStep::createConfigWidget()
{
auto widget = BuildStep::createConfigWidget();
auto updateSummary = [this, widget] {
QString path = packageFilePath();
if (path.isEmpty()) {
widget->setSummaryText("<font color=\"red\">"
+ tr("Tarball creation not possible.")
+ "</font>");
} else {
widget->setSummaryText("<b>" + tr("Create tarball:") + "</b> " + path);
}
};
connect(this, &AbstractPackagingStep::packageFilePathChanged,
this, updateSummary);
updateSummary();
return widget;
}
bool TarPackageCreationStep::fromMap(const QVariantMap &map)
{
if (!AbstractPackagingStep::fromMap(map))