[partition] Apply custom layout when installing "Alongside"

When choosing "Install alongside another system", the custom partition
layout is applied to the space freed by resizing the selected partition.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
This commit is contained in:
Arnaud Ferraris 2019-01-07 17:27:12 +01:00
parent 74a59ae68a
commit 2f14a21456
5 changed files with 31 additions and 43 deletions

View file

@ -791,10 +791,14 @@ void
PartitionCoreModule::layoutApply( Device *dev,
qint64 firstSector,
qint64 lastSector,
QString luksPassphrase )
QString luksPassphrase,
PartitionNode* parent,
const PartitionRole& role )
{
bool isEfi = PartUtils::isEfiSystem();
QList< Partition* > partList = m_partLayout->execute( dev, firstSector, lastSector, luksPassphrase );
QList< Partition* > partList = m_partLayout->execute( dev, firstSector, lastSector,
luksPassphrase, parent, role
);
foreach ( Partition *part, partList )
{
@ -811,6 +815,17 @@ PartitionCoreModule::layoutApply( Device *dev,
}
}
void
PartitionCoreModule::layoutApply( Device *dev,
qint64 firstSector,
qint64 lastSector,
QString luksPassphrase )
{
layoutApply( dev, firstSector, lastSector, luksPassphrase, dev->partitionTable(),
PartitionRole( PartitionRole::Primary )
);
}
void
PartitionCoreModule::revert()
{