[partition] Apply custom partition layout for Erase and Replace choices

This patches add new methods to both PartitionLayout and
PartitionCoreModule classes which apply the partition layout to the
available drive space.

In addition, the partition creation code from PartitioinActions is
removed to call the newly created methods instead, thus applying the
custom partition layout when the "Erase whole disk" and "Replace
partition" choices are selected.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
This commit is contained in:
Arnaud Ferraris 2019-01-07 17:26:37 +01:00
parent f863912a2f
commit 0d284759f5
5 changed files with 138 additions and 63 deletions

View file

@ -159,6 +159,7 @@ public:
void initLayout();
void initLayout( const QVariantList& config );
void layoutApply( Device *dev, qint64 firstSector, qint64 lastSector, QString luksPassphrase );
/**
* @brief jobs creates and returns a list of jobs which can then apply the changes
* requested by the user.