From 4fa61249a83a4c0bb5a246bc016ad54cde3b66a2 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 18 Jun 2021 11:29:36 +0200 Subject: [PATCH] [partition] Make the fs type used for erase, a config property --- src/modules/partition/core/Config.cpp | 2 ++ src/modules/partition/core/Config.h | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/core/Config.cpp b/src/modules/partition/core/Config.cpp index 47951321e..cfe9458cc 100644 --- a/src/modules/partition/core/Config.cpp +++ b/src/modules/partition/core/Config.cpp @@ -212,7 +212,9 @@ Config::setEraseFsTypeChoice( const QString& choice ) { if ( choice != m_eraseFsTypeChoice ) { + // FIXME: shouldn't this be a canonical fs name? m_eraseFsTypeChoice = choice; + Q_EMIT eraseModeFilesystemChanged( choice ); } } diff --git a/src/modules/partition/core/Config.h b/src/modules/partition/core/Config.h index a4f5e68f6..8b420a8d0 100644 --- a/src/modules/partition/core/Config.h +++ b/src/modules/partition/core/Config.h @@ -24,6 +24,9 @@ class Config : public QObject ///@brief The swap choice (None, Small, Hibernate, ...) which only makes sense when Erase is chosen Q_PROPERTY( SwapChoice swapChoice READ swapChoice WRITE setSwapChoice NOTIFY swapChoiceChanged ) + ///@brief Name of the FS that will be used when erasing type disk (e.g. "default filesystem") + Q_PROPERTY( QString eraseModeFilesystem READ eraseFsType WRITE setEraseFsTypeChoice NOTIFY eraseModeFilesystemChanged ) + Q_PROPERTY( bool allowManualPartitioning READ allowManualPartitioning CONSTANT FINAL ) public: @@ -109,11 +112,12 @@ public Q_SLOTS: void setInstallChoice( InstallChoice ); void setSwapChoice( int ); ///< Translates a button ID or so to SwapChoice void setSwapChoice( SwapChoice ); - void setEraseFsTypeChoice( const QString& ); + void setEraseFsTypeChoice( const QString& filesystemName ); ///< See property eraseModeFilesystem Q_SIGNALS: void installChoiceChanged( InstallChoice ); void swapChoiceChanged( SwapChoice ); + void eraseModeFilesystemChanged( const QString& ); private: SwapChoiceSet m_swapChoices;