mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04:00
[partition] Don't show capacity of new LVM VGs in DeviceModel.
This commit is contained in:
parent
208d58bcd9
commit
e5351cdf3c
1 changed files with 12 additions and 4 deletions
|
@ -79,10 +79,18 @@ DeviceModel::data( const QModelIndex& index, int role ) const
|
||||||
if ( device->name().isEmpty() )
|
if ( device->name().isEmpty() )
|
||||||
return device->deviceNode();
|
return device->deviceNode();
|
||||||
else
|
else
|
||||||
return tr( "%1 - %2 (%3)" )
|
{
|
||||||
.arg( device->name() )
|
if ( device->capacity() != 1 )
|
||||||
.arg( KFormat().formatByteSize( device->capacity() ) )
|
return tr( "%1 - %2 (%3)" )
|
||||||
.arg( device->deviceNode() );
|
.arg( device->name() )
|
||||||
|
.arg( KFormat().formatByteSize( device->capacity() ) )
|
||||||
|
.arg( device->deviceNode() );
|
||||||
|
// Newly LVM VGs don't have capacity property yet (i.e. always has 1B capacity), so don't show it for a while
|
||||||
|
else
|
||||||
|
return tr( "%1 - (%2)" )
|
||||||
|
.arg( device->name() )
|
||||||
|
.arg( device->deviceNode() );
|
||||||
|
}
|
||||||
case Qt::DecorationRole:
|
case Qt::DecorationRole:
|
||||||
return CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionDisk,
|
return CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionDisk,
|
||||||
CalamaresUtils::Original,
|
CalamaresUtils::Original,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue