mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 10:55:37 -04:00
[partition] Move partitioning options into a class
- As (auto) partitioning grows more options, the parameter list becomes more unwieldy. Add some structure to it.
This commit is contained in:
parent
5136021416
commit
d2f4079a18
4 changed files with 121 additions and 86 deletions
|
@ -85,6 +85,8 @@ ReplaceWidget::reset()
|
|||
void
|
||||
ReplaceWidget::applyChanges()
|
||||
{
|
||||
auto gs = Calamares::JobQueue::instance()->globalStorage();
|
||||
|
||||
PartitionModel* model = qobject_cast< PartitionModel* >( m_ui->partitionTreeView->model() );
|
||||
if ( model )
|
||||
{
|
||||
|
@ -93,7 +95,9 @@ ReplaceWidget::applyChanges()
|
|||
{
|
||||
Device* dev = model->device();
|
||||
|
||||
PartitionActions::doReplacePartition( m_core, dev, partition );
|
||||
PartitionActions::doReplacePartition(
|
||||
m_core, dev, partition,
|
||||
{ gs->value( "defaultFileSystemType" ).toString(), QString() } );
|
||||
|
||||
if ( m_isEfi )
|
||||
{
|
||||
|
@ -102,17 +106,13 @@ ReplaceWidget::applyChanges()
|
|||
{
|
||||
PartitionInfo::setMountPoint(
|
||||
efiSystemPartitions.first(),
|
||||
Calamares::JobQueue::instance()->
|
||||
globalStorage()->
|
||||
value( "efiSystemPartition" ).toString() );
|
||||
gs->value( "efiSystemPartition" ).toString() );
|
||||
}
|
||||
else if ( efiSystemPartitions.count() > 1 )
|
||||
{
|
||||
PartitionInfo::setMountPoint(
|
||||
efiSystemPartitions.at( m_ui->bootComboBox->currentIndex() ),
|
||||
Calamares::JobQueue::instance()->
|
||||
globalStorage()->
|
||||
value( "efiSystemPartition" ).toString() );
|
||||
gs->value( "efiSystemPartition" ).toString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue