mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 17:05:36 -04:00
Use UUIDs instead of paths to match osprober entries with partitions.
This commit is contained in:
parent
811261258b
commit
849137c20b
1 changed files with 15 additions and 5 deletions
|
@ -205,27 +205,37 @@ PartitionModel::data( const QModelIndex& index, int role ) const
|
|||
// Osprober roles:
|
||||
case OsproberNameRole:
|
||||
foreach ( const OsproberEntry& osproberEntry, m_osproberEntries )
|
||||
if ( osproberEntry.path == partition->partitionPath() )
|
||||
if ( partition->fileSystem().supportGetUUID() != FileSystem::cmdSupportNone &&
|
||||
!partition->fileSystem().uuid().isEmpty() &&
|
||||
osproberEntry.uuid == partition->fileSystem().uuid() )
|
||||
return osproberEntry.prettyName;
|
||||
return QVariant();
|
||||
case OsproberPathRole:
|
||||
foreach ( const OsproberEntry& osproberEntry, m_osproberEntries )
|
||||
if ( osproberEntry.path == partition->partitionPath() )
|
||||
if ( partition->fileSystem().supportGetUUID() != FileSystem::cmdSupportNone &&
|
||||
!partition->fileSystem().uuid().isEmpty() &&
|
||||
osproberEntry.uuid == partition->fileSystem().uuid() )
|
||||
return osproberEntry.path;
|
||||
return QVariant();
|
||||
case OsproberCanBeResizedRole:
|
||||
foreach ( const OsproberEntry& osproberEntry, m_osproberEntries )
|
||||
if ( osproberEntry.path == partition->partitionPath() )
|
||||
if ( partition->fileSystem().supportGetUUID() != FileSystem::cmdSupportNone &&
|
||||
!partition->fileSystem().uuid().isEmpty() &&
|
||||
osproberEntry.uuid == partition->fileSystem().uuid() )
|
||||
return osproberEntry.canBeResized;
|
||||
return QVariant();
|
||||
case OsproberRawLineRole:
|
||||
foreach ( const OsproberEntry& osproberEntry, m_osproberEntries )
|
||||
if ( osproberEntry.path == partition->partitionPath() )
|
||||
if ( partition->fileSystem().supportGetUUID() != FileSystem::cmdSupportNone &&
|
||||
!partition->fileSystem().uuid().isEmpty() &&
|
||||
osproberEntry.uuid == partition->fileSystem().uuid() )
|
||||
return osproberEntry.line;
|
||||
return QVariant();
|
||||
case OsproberHomePartitionPathRole:
|
||||
foreach ( const OsproberEntry& osproberEntry, m_osproberEntries )
|
||||
if ( osproberEntry.path == partition->partitionPath() )
|
||||
if ( partition->fileSystem().supportGetUUID() != FileSystem::cmdSupportNone &&
|
||||
!partition->fileSystem().uuid().isEmpty() &&
|
||||
osproberEntry.uuid == partition->fileSystem().uuid() )
|
||||
return osproberEntry.homePath;
|
||||
return QVariant();
|
||||
// end Osprober roles.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue