Fix Next button behviour for all combinations of
enableLuksAutomatedPartitioning and preCheckEncryption configure file variables
This commit is contained in:
parent
5ac23cd3d6
commit
8469fbd2e8
@ -185,7 +185,6 @@ ChoicePage::init( PartitionCoreModule* core )
|
|||||||
setModelToComboBox( m_drivesCombo, core->deviceModel() );
|
setModelToComboBox( m_drivesCombo, core->deviceModel() );
|
||||||
|
|
||||||
connect( m_drivesCombo, qOverload< int >( &QComboBox::currentIndexChanged ), this, &ChoicePage::applyDeviceChoice );
|
connect( m_drivesCombo, qOverload< int >( &QComboBox::currentIndexChanged ), this, &ChoicePage::applyDeviceChoice );
|
||||||
|
|
||||||
connect( m_encryptWidget, &EncryptWidget::stateChanged, this, &ChoicePage::onEncryptWidgetStateChanged );
|
connect( m_encryptWidget, &EncryptWidget::stateChanged, this, &ChoicePage::onEncryptWidgetStateChanged );
|
||||||
connect( m_reuseHomeCheckBox, &QCheckBox::stateChanged, this, &ChoicePage::onHomeCheckBoxStateChanged );
|
connect( m_reuseHomeCheckBox, &QCheckBox::stateChanged, this, &ChoicePage::onHomeCheckBoxStateChanged );
|
||||||
|
|
||||||
@ -469,11 +468,8 @@ ChoicePage::onActionChanged()
|
|||||||
m_encryptWidget->setFilesystem( FileSystem::typeForName( m_replaceFsTypesChoiceComboBox->currentText() ) );
|
m_encryptWidget->setFilesystem( FileSystem::typeForName( m_replaceFsTypesChoiceComboBox->currentText() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_config->preCheckEncryption() )
|
|
||||||
{
|
|
||||||
m_encryptWidget->setEncryptionCheckbox( m_config->preCheckEncryption() );
|
m_encryptWidget->setEncryptionCheckbox( m_config->preCheckEncryption() );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Device* currd = selectedDevice();
|
Device* currd = selectedDevice();
|
||||||
if ( currd )
|
if ( currd )
|
||||||
@ -1580,7 +1576,9 @@ ChoicePage::calculateNextEnabled() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_config->installChoice() != InstallChoice::Manual && m_encryptWidget->isVisible() )
|
if ( m_config->installChoice() != InstallChoice::Manual
|
||||||
|
&& (m_encryptWidget->isVisible() ||
|
||||||
|
m_encryptWidget->isEncryptionCheckboxChecked()))
|
||||||
{
|
{
|
||||||
switch ( m_encryptWidget->state() )
|
switch ( m_encryptWidget->state() )
|
||||||
{
|
{
|
||||||
|
@ -70,6 +70,11 @@ EncryptWidget::EncryptWidget( QWidget* parent )
|
|||||||
CALAMARES_RETRANSLATE_SLOT( &EncryptWidget::retranslate );
|
CALAMARES_RETRANSLATE_SLOT( &EncryptWidget::retranslate );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EncryptWidget::isEncryptionCheckboxChecked()
|
||||||
|
{
|
||||||
|
return m_ui->m_encryptCheckBox->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
void EncryptWidget::setEncryptionCheckbox( bool preCheckEncrypt)
|
void EncryptWidget::setEncryptionCheckbox( bool preCheckEncrypt)
|
||||||
{
|
{
|
||||||
m_ui->m_encryptCheckBox->setChecked( preCheckEncrypt );
|
m_ui->m_encryptCheckBox->setChecked( preCheckEncrypt );
|
||||||
@ -174,16 +179,11 @@ EncryptWidget::updateState( const bool notify )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Encryption newState = state();
|
m_state = state();
|
||||||
|
|
||||||
if ( newState != m_state )
|
|
||||||
{
|
|
||||||
m_state = newState;
|
|
||||||
if ( notify )
|
if ( notify )
|
||||||
{
|
{
|
||||||
Q_EMIT stateChanged( m_state );
|
Q_EMIT stateChanged( m_state );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -39,6 +39,7 @@ public:
|
|||||||
void setEncryptionCheckbox( bool preCheckEncrypt = false);
|
void setEncryptionCheckbox( bool preCheckEncrypt = false);
|
||||||
void reset( bool checkVisible = true );
|
void reset( bool checkVisible = true );
|
||||||
|
|
||||||
|
bool isEncryptionCheckboxChecked();
|
||||||
Encryption state() const;
|
Encryption state() const;
|
||||||
void setText( const QString& text );
|
void setText( const QString& text );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user