Add PartitionPtrRole to PartitionModel.

main
Teo Mrnjavac 9 years ago
parent 1a4b6b1c9c
commit b663ce5f74

@ -176,6 +176,9 @@ PartitionModel::data( const QModelIndex& index, int role ) const
case FileSystemTypeRole: case FileSystemTypeRole:
return partition->fileSystem().type(); return partition->fileSystem().type();
case PartitionPtrRole:
return qVariantFromValue( (void*)partition );
// Osprober roles: // Osprober roles:
case OsproberNameRole: case OsproberNameRole:
foreach ( const OsproberEntry& osproberEntry, m_osproberEntries ) foreach ( const OsproberEntry& osproberEntry, m_osproberEntries )

@ -72,6 +72,7 @@ public:
IsPartitionNewRole, IsPartitionNewRole,
FileSystemLabelRole, FileSystemLabelRole,
FileSystemTypeRole, FileSystemTypeRole,
PartitionPtrRole, // passed as void*, use sparingly
OsproberNameRole, OsproberNameRole,
OsproberPathRole, OsproberPathRole,
OsproberCanBeResizedRole, OsproberCanBeResizedRole,

Loading…
Cancel
Save