mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[partition] Tidy up code
- avoid possible nullptr dereference on connect() if no swap choices - group retranslations together
This commit is contained in:
parent
24422b19bd
commit
aef61a42bc
1 changed files with 5 additions and 6 deletions
|
@ -276,10 +276,6 @@ ChoicePage::setupChoices()
|
||||||
m_itemsLayout->addWidget( m_eraseButton );
|
m_itemsLayout->addWidget( m_eraseButton );
|
||||||
|
|
||||||
m_somethingElseButton = new PrettyRadioButton;
|
m_somethingElseButton = new PrettyRadioButton;
|
||||||
CALAMARES_RETRANSLATE(
|
|
||||||
m_somethingElseButton->setText( tr( "<strong>Manual partitioning</strong><br/>"
|
|
||||||
"You can create or resize partitions yourself." ) );
|
|
||||||
)
|
|
||||||
m_somethingElseButton->setIconSize( iconSize );
|
m_somethingElseButton->setIconSize( iconSize );
|
||||||
m_somethingElseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionManual,
|
m_somethingElseButton->setIcon( CalamaresUtils::defaultPixmap( CalamaresUtils::PartitionManual,
|
||||||
CalamaresUtils::Original,
|
CalamaresUtils::Original,
|
||||||
|
@ -317,10 +313,13 @@ ChoicePage::setupChoices()
|
||||||
|
|
||||||
connect( this, &ChoicePage::actionChosen,
|
connect( this, &ChoicePage::actionChosen,
|
||||||
this, &ChoicePage::onActionChanged );
|
this, &ChoicePage::onActionChanged );
|
||||||
connect( m_eraseSwapChoices, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
if ( m_eraseSwapChoices )
|
||||||
this, &ChoicePage::onActionChanged );
|
connect( m_eraseSwapChoices, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
|
this, &ChoicePage::onActionChanged );
|
||||||
|
|
||||||
CALAMARES_RETRANSLATE(
|
CALAMARES_RETRANSLATE(
|
||||||
|
m_somethingElseButton->setText( tr( "<strong>Manual partitioning</strong><br/>"
|
||||||
|
"You can create or resize partitions yourself." ) );
|
||||||
updateSwapChoicesTr( m_eraseSwapChoices );
|
updateSwapChoicesTr( m_eraseSwapChoices );
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue