[partition] Migrate the defaultFS type

- remove the m_defaultFSType from PartitionLayout, because it is
  set on construction -- which is too early, before the configuration
  has been read.
- make the default FS explicit in the init() calls which pass in
  a configuration; this needs support in the intermediate
  PartitionCoreModule.
This commit is contained in:
Adriaan de Groot 2020-11-02 21:35:43 +01:00
parent 42014a8201
commit 73b5a0898d
5 changed files with 44 additions and 40 deletions

View file

@ -83,7 +83,13 @@ public:
PartitionLayout( const PartitionLayout& layout );
~PartitionLayout();
void init( const QVariantList& config );
/** @brief create the configuration from @p config
*
* @p config is a list of partition entries (in QVariant form,
* read from YAML). If no entries are given, then a single
* partition is created with the given @p defaultFsType
*/
void init( FileSystem::Type defaultFsType, const QVariantList& config );
bool addEntry( const PartitionEntry& entry );
/**
@ -98,7 +104,6 @@ public:
const PartitionRole& role );
private:
FileSystem::Type m_defaultFsType;
QList< PartitionEntry > m_partLayout;
};