Skip to content
Snippets Groups Projects
Commit 60f8a7c5 authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

[partition] Don't offer /boot if EFI wants something else

- Don't leave /boot in the list always; EFI might be configured
  for /boot/efi on this system
- While here, apply coding style.
parent 6936915d
No related branches found
No related tags found
No related merge requests found
...@@ -23,11 +23,15 @@ ...@@ -23,11 +23,15 @@
QStringList QStringList
standardMountPoints() standardMountPoints()
{ {
QStringList mountPoints { "/", "/boot", "/home", "/opt", "/srv", "/usr", "/var" }; QStringList mountPoints { "/", "/home", "/opt", "/srv", "/usr", "/var" };
if ( PartUtils::isEfiSystem() ) if ( PartUtils::isEfiSystem() )
{ {
mountPoints << Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString(); mountPoints << Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString();
} }
else
{
mountPoints << QStringLiteral( "/boot" );
}
mountPoints.removeDuplicates(); mountPoints.removeDuplicates();
mountPoints.sort(); mountPoints.sort();
return mountPoints; return mountPoints;
...@@ -68,11 +72,13 @@ setSelectedMountPoint( QComboBox& combo, const QString& selected ) ...@@ -68,11 +72,13 @@ setSelectedMountPoint( QComboBox& combo, const QString& selected )
else else
{ {
for ( int i = 0; i < combo.count(); ++i ) for ( int i = 0; i < combo.count(); ++i )
{
if ( selected == combo.itemText( i ) ) if ( selected == combo.itemText( i ) )
{ {
combo.setCurrentIndex( i ); combo.setCurrentIndex( i );
return; return;
} }
}
combo.addItem( selected ); combo.addItem( selected );
combo.setCurrentIndex( combo.count() - 1 ); combo.setCurrentIndex( combo.count() - 1 );
} }
...@@ -85,10 +91,12 @@ flagsFromList( const QListWidget& list ) ...@@ -85,10 +91,12 @@ flagsFromList( const QListWidget& list )
PartitionTable::Flags flags; PartitionTable::Flags flags;
for ( int i = 0; i < list.count(); i++ ) for ( int i = 0; i < list.count(); i++ )
{
if ( list.item( i )->checkState() == Qt::Checked ) if ( list.item( i )->checkState() == Qt::Checked )
{ {
flags |= static_cast< PartitionTable::Flag >( list.item( i )->data( Qt::UserRole ).toInt() ); flags |= static_cast< PartitionTable::Flag >( list.item( i )->data( Qt::UserRole ).toInt() );
} }
}
return flags; return flags;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment