mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
[partition] Create swap-combo from a set
- Alternate way to create swap-combobox, using configuration values rather than an initializer list.
This commit is contained in:
parent
988a0a5388
commit
edc6c64657
1 changed files with 10 additions and 0 deletions
|
@ -194,6 +194,16 @@ createCombo( std::initializer_list< SwapChoice > l )
|
||||||
return box;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline QComboBox*
|
||||||
|
createCombo( const QSet< SwapChoice >& s )
|
||||||
|
{
|
||||||
|
QComboBox* box = new QComboBox;
|
||||||
|
for ( SwapChoice c : { SwapChoice::NoSwap, SwapChoice::SmallSwap, SwapChoice::FullSwap, SwapChoice::ReuseSwap, SwapChoice::SwapFile } )
|
||||||
|
if ( s.contains( c ) )
|
||||||
|
box->addItem( QString(), c );
|
||||||
|
return box;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief ChoicePage::setupChoices creates PrettyRadioButton objects for the action
|
* @brief ChoicePage::setupChoices creates PrettyRadioButton objects for the action
|
||||||
* choices.
|
* choices.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue