diff --git a/src/modules/partition/Config.cpp b/src/modules/partition/Config.cpp index 2010fecdd..f4e404c28 100644 --- a/src/modules/partition/Config.cpp +++ b/src/modules/partition/Config.cpp @@ -444,6 +444,7 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) m_allowZfsEncryption = Calamares::getBool( configurationMap, "allowZfsEncryption", true ); m_allowManualPartitioning = Calamares::getBool( configurationMap, "allowManualPartitioning", true ); + m_preCheckEncryption = Calamares::getBool( configurationMap, "preCheckEncryption", false ); m_showNotEncryptedBootMessage = Calamares::getBool( configurationMap, "showNotEncryptedBootMessage", true ); m_requiredPartitionTableType = Calamares::getStringList( configurationMap, "requiredPartitionTableType" ); diff --git a/src/modules/partition/Config.h b/src/modules/partition/Config.h index d8d68c6d2..199ddaf88 100644 --- a/src/modules/partition/Config.h +++ b/src/modules/partition/Config.h @@ -35,7 +35,7 @@ class Config : public QObject replaceModeFilesystemChanged ) Q_PROPERTY( bool allowManualPartitioning READ allowManualPartitioning CONSTANT FINAL ) - + Q_PROPERTY( bool preCheckEncryption READ preCheckEncryption CONSTANT FINAL ) Q_PROPERTY( bool showNotEncryptedBootMessage READ showNotEncryptedBootMessage CONSTANT FINAL ) public: @@ -148,6 +148,13 @@ public: /// @brief Is manual partitioning allowed (not explicitly disabled in the config file)? bool allowManualPartitioning() const { return m_allowManualPartitioning; } + /** @brief pre check encryption checkbox. + * + * parameter is used if enableLuksAutomatedPartitioning is true. + * Default value is false + */ + bool preCheckEncryption() const { return m_preCheckEncryption; } + /// @brief Show "Boot partition not encrypted" warning (not explicitly disabled in the config file)? bool showNotEncryptedBootMessage() const { return m_showNotEncryptedBootMessage; } @@ -199,6 +206,7 @@ private: QStringList m_requiredPartitionTableType; bool m_allowZfsEncryption = true; bool m_allowManualPartitioning = true; + bool m_preCheckEncryption = false; bool m_showNotEncryptedBootMessage = true; }; diff --git a/src/modules/partition/PartitionViewStep.cpp b/src/modules/partition/PartitionViewStep.cpp index 4b170a8ab..119bf1baa 100644 --- a/src/modules/partition/PartitionViewStep.cpp +++ b/src/modules/partition/PartitionViewStep.cpp @@ -698,8 +698,6 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) Calamares::getBool( configurationMap, "alwaysShowPartitionLabels", true ) ); gs->insert( "enableLuksAutomatedPartitioning", Calamares::getBool( configurationMap, "enableLuksAutomatedPartitioning", true ) ); - gs->insert( "preCheckEncryption", - Calamares::getBool( configurationMap, "preCheckEncryption", false ) ); QString partitionTableName = Calamares::getString( configurationMap, "defaultPartitionTableType" ); if ( partitionTableName.isEmpty() ) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 823525fd3..ccb59e5cb 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -90,7 +90,7 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent ) auto gs = Calamares::JobQueue::instance()->globalStorage(); m_enableEncryptionWidget = gs->value( "enableLuksAutomatedPartitioning" ).toBool(); - m_preCheckEncryption = gs->value( "preCheckEncryption" ).toBool(); + m_preCheckEncryption = m_config->preCheckEncryption(); // Set up drives combo m_mainLayout->setDirection( QBoxLayout::TopToBottom );