[packagechooser] Simplify parameters
- Just pass the no-package-selected item around.
This commit is contained in:
parent
996714dd06
commit
01c4383178
@ -164,9 +164,8 @@ PackageChooserPage::selectedPackageIds() const
|
||||
}
|
||||
|
||||
void
|
||||
PackageChooserPage::setIntroduction( const CalamaresUtils::Locale::TranslatedString& name,
|
||||
const CalamaresUtils::Locale::TranslatedString& description )
|
||||
PackageChooserPage::setIntroduction( const PackageItem& item )
|
||||
{
|
||||
m_introduction.name = name;
|
||||
m_introduction.description = description;
|
||||
m_introduction.name = item.name;
|
||||
m_introduction.description = item.description;
|
||||
}
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
#include "PackageModel.h"
|
||||
|
||||
#include "locale/TranslatableConfiguration.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QWidget>
|
||||
|
||||
@ -40,8 +38,7 @@ public:
|
||||
void setModel( QAbstractItemModel* model );
|
||||
|
||||
/// @brief Sets the introductory (no-package-selected) texts
|
||||
void setIntroduction( const CalamaresUtils::Locale::TranslatedString& name,
|
||||
const CalamaresUtils::Locale::TranslatedString& description );
|
||||
void setIntroduction( const PackageItem& item );
|
||||
/// @brief Is anything selected?
|
||||
bool hasSelection() const;
|
||||
/** @brief Get the list of selected ids
|
||||
|
@ -288,7 +288,7 @@ PackageChooserViewStep::hookupModel()
|
||||
const auto& package = m_model->packageData( i );
|
||||
if ( package.id.isEmpty() )
|
||||
{
|
||||
m_widget->setIntroduction( package.name, package.description );
|
||||
m_widget->setIntroduction( package );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user