PartitionModel: Add IsFreeSpaceRole

main
Aurélien Gâteau 11 years ago
parent 0ea6f1698b
commit fe9e52ee0e

@ -174,6 +174,8 @@ PartitionModel::data( const QModelIndex& index, int role ) const
return QVariant();
case SizeRole:
return ( partition->lastSector() - partition->firstSector() + 1 ) * m_device->logicalSectorSize();
case IsFreeSpaceRole:
return PMUtils::isPartitionFreeSpace( partition );
default:
return QVariant();
}

@ -50,7 +50,8 @@ public:
{
// The raw size, as a qlonglong. This is different from the DisplayRole of
// SizeColumn, which is a human-readable string.
SizeRole = Qt::UserRole + 1
SizeRole = Qt::UserRole + 1,
IsFreeSpaceRole
};
enum Column

Loading…
Cancel
Save