[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
@ -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…
Reference in New Issue
Block a user