Add filesystem label role.

This commit is contained in:
Teo Mrnjavac 2015-12-15 15:41:42 +01:00
parent 0224811bf6
commit c765de654c
2 changed files with 7 additions and 0 deletions

View file

@ -164,6 +164,12 @@ PartitionModel::data( const QModelIndex& index, int role ) const
case IsFreeSpaceRole:
return KPMHelpers::isPartitionFreeSpace( partition );
case FileSystemLabelRole:
if ( partition->fileSystem().supportGetLabel() != FileSystem::cmdSupportNone &&
!partition->fileSystem().label().isEmpty() )
return partition->fileSystem().label();
return QVariant();
// Osprober roles:
case OsproberNameRole:
foreach ( const OsproberEntry& osproberEntry, m_osproberEntries )