[partition] Tidy up description in prettyStatus
- the length parameter to diskDescription() is worse than useless, because it doesn't say anything about what will be done if there's more than one disk.
This commit is contained in:
parent
9dd2f275f1
commit
7129a2239c
@ -52,8 +52,8 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
|
|||||||
|
|
||||||
m_waitingWidget = new WaitingWidget( QString() );
|
m_waitingWidget = new WaitingWidget( QString() );
|
||||||
m_widget->addWidget( m_waitingWidget );
|
m_widget->addWidget( m_waitingWidget );
|
||||||
CALAMARES_RETRANSLATE(
|
CALAMARES_RETRANSLATE( if ( m_waitingWidget )
|
||||||
if ( m_waitingWidget ) { m_waitingWidget->setText( tr( "Gathering system information..." ) ); } );
|
{ m_waitingWidget->setText( tr( "Gathering system information..." ) ); } );
|
||||||
|
|
||||||
m_core = new PartitionCoreModule( this ); // Unusable before init is complete!
|
m_core = new PartitionCoreModule( this ); // Unusable before init is complete!
|
||||||
// We're not done loading, but we need the configuration map first.
|
// We're not done loading, but we need the configuration map first.
|
||||||
@ -216,18 +216,13 @@ diskDescription( int listLength, const PartitionCoreModule::SummaryInfo& info, C
|
|||||||
QString
|
QString
|
||||||
PartitionViewStep::prettyStatus() const
|
PartitionViewStep::prettyStatus() const
|
||||||
{
|
{
|
||||||
QString diskInfoLabel;
|
|
||||||
|
|
||||||
const Config::InstallChoice choice = m_config->installChoice();
|
const Config::InstallChoice choice = m_config->installChoice();
|
||||||
const QList< PartitionCoreModule::SummaryInfo > list = m_core->createSummaryInfo();
|
const QList< PartitionCoreModule::SummaryInfo > list = m_core->createSummaryInfo();
|
||||||
|
|
||||||
cDebug() << "Summary for Partition" << list.length() << choice;
|
cDebug() << "Summary for Partition" << list.length() << choice;
|
||||||
for ( const auto& info : list )
|
auto joinDiskInfo = [ choice = choice ]( QString& s, const PartitionCoreModule::SummaryInfo& i )
|
||||||
{
|
{ return s + diskDescription( 1, i, choice ); };
|
||||||
// TODO: this overwrites each iteration
|
const QString diskInfoLabel = std::accumulate( list.begin(), list.end(), QString(), joinDiskInfo );
|
||||||
diskInfoLabel = diskDescription( list.length(), info, choice );
|
|
||||||
}
|
|
||||||
|
|
||||||
const QString jobsLabel = jobDescriptions( jobs() ).join( QStringLiteral( "<br/>" ) );
|
const QString jobsLabel = jobDescriptions( jobs() ).join( QStringLiteral( "<br/>" ) );
|
||||||
return diskInfoLabel + "<br/>" + jobsLabel;
|
return diskInfoLabel + "<br/>" + jobsLabel;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user