mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-01 19:35:36 -04:00
[partition] Display partition labels when they exist
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
This commit is contained in:
parent
0d284759f5
commit
74a59ae68a
1 changed files with 28 additions and 19 deletions
|
@ -184,6 +184,14 @@ PartitionLabelsView::buildTexts( const QModelIndex& index ) const
|
|||
QString firstLine, secondLine;
|
||||
|
||||
if ( index.data( PartitionModel::IsPartitionNewRole ).toBool() )
|
||||
{
|
||||
QString label = index.data( PartitionModel::FileSystemLabelRole ).toString();
|
||||
|
||||
if ( !label.isEmpty() )
|
||||
{
|
||||
firstLine = label;
|
||||
}
|
||||
else
|
||||
{
|
||||
QString mountPoint = index.sibling( index.row(),
|
||||
PartitionModel::MountPointColumn )
|
||||
|
@ -206,6 +214,7 @@ PartitionLabelsView::buildTexts( const QModelIndex& index ) const
|
|||
else
|
||||
firstLine = tr( "New partition" );
|
||||
}
|
||||
}
|
||||
else if ( index.data( PartitionModel::OsproberNameRole ).toString().isEmpty() )
|
||||
{
|
||||
firstLine = index.data().toString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue