Trim /dev/ from visible partition paths.
This commit is contained in:
parent
18755314fd
commit
3732f3e5b2
@ -189,7 +189,11 @@ PartitionLabelsView::buildTexts( const QModelIndex& index ) const
|
|||||||
firstLine = tr( "New partition for %1" ).arg( mountPoint );
|
firstLine = tr( "New partition for %1" ).arg( mountPoint );
|
||||||
}
|
}
|
||||||
else if ( index.data( PartitionModel::OsproberNameRole ).toString().isEmpty() )
|
else if ( index.data( PartitionModel::OsproberNameRole ).toString().isEmpty() )
|
||||||
|
{
|
||||||
firstLine = index.data().toString();
|
firstLine = index.data().toString();
|
||||||
|
if ( firstLine.startsWith( "/dev/sd" ) )
|
||||||
|
firstLine.remove( 0, 5 ); // "/dev/"
|
||||||
|
}
|
||||||
else
|
else
|
||||||
firstLine = index.data( PartitionModel::OsproberNameRole ).toString();
|
firstLine = index.data( PartitionModel::OsproberNameRole ).toString();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user