do not use Global Storage for variable PreCheckEncryption, other modules
don't have to know if this variable is set to true or false
This commit is contained in:
parent
70a59d6cd1
commit
cc835cee6f
@ -444,6 +444,7 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
m_allowZfsEncryption = Calamares::getBool( configurationMap, "allowZfsEncryption", true );
|
m_allowZfsEncryption = Calamares::getBool( configurationMap, "allowZfsEncryption", true );
|
||||||
|
|
||||||
m_allowManualPartitioning = Calamares::getBool( configurationMap, "allowManualPartitioning", true );
|
m_allowManualPartitioning = Calamares::getBool( configurationMap, "allowManualPartitioning", true );
|
||||||
|
m_preCheckEncryption = Calamares::getBool( configurationMap, "preCheckEncryption", false );
|
||||||
m_showNotEncryptedBootMessage = Calamares::getBool( configurationMap, "showNotEncryptedBootMessage", true );
|
m_showNotEncryptedBootMessage = Calamares::getBool( configurationMap, "showNotEncryptedBootMessage", true );
|
||||||
m_requiredPartitionTableType = Calamares::getStringList( configurationMap, "requiredPartitionTableType" );
|
m_requiredPartitionTableType = Calamares::getStringList( configurationMap, "requiredPartitionTableType" );
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class Config : public QObject
|
|||||||
replaceModeFilesystemChanged )
|
replaceModeFilesystemChanged )
|
||||||
|
|
||||||
Q_PROPERTY( bool allowManualPartitioning READ allowManualPartitioning CONSTANT FINAL )
|
Q_PROPERTY( bool allowManualPartitioning READ allowManualPartitioning CONSTANT FINAL )
|
||||||
|
Q_PROPERTY( bool preCheckEncryption READ preCheckEncryption CONSTANT FINAL )
|
||||||
Q_PROPERTY( bool showNotEncryptedBootMessage READ showNotEncryptedBootMessage CONSTANT FINAL )
|
Q_PROPERTY( bool showNotEncryptedBootMessage READ showNotEncryptedBootMessage CONSTANT FINAL )
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -148,6 +148,13 @@ public:
|
|||||||
/// @brief Is manual partitioning allowed (not explicitly disabled in the config file)?
|
/// @brief Is manual partitioning allowed (not explicitly disabled in the config file)?
|
||||||
bool allowManualPartitioning() const { return m_allowManualPartitioning; }
|
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)?
|
/// @brief Show "Boot partition not encrypted" warning (not explicitly disabled in the config file)?
|
||||||
bool showNotEncryptedBootMessage() const { return m_showNotEncryptedBootMessage; }
|
bool showNotEncryptedBootMessage() const { return m_showNotEncryptedBootMessage; }
|
||||||
|
|
||||||
@ -199,6 +206,7 @@ private:
|
|||||||
QStringList m_requiredPartitionTableType;
|
QStringList m_requiredPartitionTableType;
|
||||||
bool m_allowZfsEncryption = true;
|
bool m_allowZfsEncryption = true;
|
||||||
bool m_allowManualPartitioning = true;
|
bool m_allowManualPartitioning = true;
|
||||||
|
bool m_preCheckEncryption = false;
|
||||||
bool m_showNotEncryptedBootMessage = true;
|
bool m_showNotEncryptedBootMessage = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -698,8 +698,6 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
Calamares::getBool( configurationMap, "alwaysShowPartitionLabels", true ) );
|
Calamares::getBool( configurationMap, "alwaysShowPartitionLabels", true ) );
|
||||||
gs->insert( "enableLuksAutomatedPartitioning",
|
gs->insert( "enableLuksAutomatedPartitioning",
|
||||||
Calamares::getBool( configurationMap, "enableLuksAutomatedPartitioning", true ) );
|
Calamares::getBool( configurationMap, "enableLuksAutomatedPartitioning", true ) );
|
||||||
gs->insert( "preCheckEncryption",
|
|
||||||
Calamares::getBool( configurationMap, "preCheckEncryption", false ) );
|
|
||||||
|
|
||||||
QString partitionTableName = Calamares::getString( configurationMap, "defaultPartitionTableType" );
|
QString partitionTableName = Calamares::getString( configurationMap, "defaultPartitionTableType" );
|
||||||
if ( partitionTableName.isEmpty() )
|
if ( partitionTableName.isEmpty() )
|
||||||
|
@ -90,7 +90,7 @@ ChoicePage::ChoicePage( Config* config, QWidget* parent )
|
|||||||
auto gs = Calamares::JobQueue::instance()->globalStorage();
|
auto gs = Calamares::JobQueue::instance()->globalStorage();
|
||||||
|
|
||||||
m_enableEncryptionWidget = gs->value( "enableLuksAutomatedPartitioning" ).toBool();
|
m_enableEncryptionWidget = gs->value( "enableLuksAutomatedPartitioning" ).toBool();
|
||||||
m_preCheckEncryption = gs->value( "preCheckEncryption" ).toBool();
|
m_preCheckEncryption = m_config->preCheckEncryption();
|
||||||
|
|
||||||
// Set up drives combo
|
// Set up drives combo
|
||||||
m_mainLayout->setDirection( QBoxLayout::TopToBottom );
|
m_mainLayout->setDirection( QBoxLayout::TopToBottom );
|
||||||
|
Loading…
Reference in New Issue
Block a user