[partition] Don't display unsupported swap styles
- Suppress unsupported options while reading the config file.
This commit is contained in:
parent
0fdc737968
commit
04b4e37bd0
@ -612,19 +612,20 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
else
|
else
|
||||||
choices.insert( PartitionActions::Choices::SwapChoice::SmallSwap );
|
choices.insert( PartitionActions::Choices::SwapChoice::SmallSwap );
|
||||||
}
|
}
|
||||||
m_swapChoices = choices;
|
|
||||||
|
|
||||||
// Not all are supported right now // FIXME
|
// Not all are supported right now // FIXME
|
||||||
static const char unsupportedSetting[] = "Partition-module does not support *userSwapChoices* setting";
|
static const char unsupportedSetting[] = "Partition-module does not support *userSwapChoices* setting";
|
||||||
|
|
||||||
#define COMPLAIN_UNSUPPORTED(x) \
|
#define COMPLAIN_UNSUPPORTED(x) \
|
||||||
if ( choices.contains( x ) ) \
|
if ( choices.contains( x ) ) \
|
||||||
{ cWarning() << unsupportedSetting << PartitionActions::Choices::choiceToName( x ); }
|
{ cWarning() << unsupportedSetting << PartitionActions::Choices::choiceToName( x ); choices.remove( x ); }
|
||||||
|
|
||||||
COMPLAIN_UNSUPPORTED( PartitionActions::Choices::SwapChoice::SwapFile )
|
COMPLAIN_UNSUPPORTED( PartitionActions::Choices::SwapChoice::SwapFile )
|
||||||
COMPLAIN_UNSUPPORTED( PartitionActions::Choices::SwapChoice::ReuseSwap )
|
COMPLAIN_UNSUPPORTED( PartitionActions::Choices::SwapChoice::ReuseSwap )
|
||||||
#undef COMPLAIN_UNSUPPORTED
|
#undef COMPLAIN_UNSUPPORTED
|
||||||
|
|
||||||
|
m_swapChoices = choices;
|
||||||
|
|
||||||
// These gs settings seem to be unused (in upstream Calamares) outside of
|
// These gs settings seem to be unused (in upstream Calamares) outside of
|
||||||
// the partition module itself.
|
// the partition module itself.
|
||||||
gs->insert( "ensureSuspendToDisk", ensureSuspendToDisk );
|
gs->insert( "ensureSuspendToDisk", ensureSuspendToDisk );
|
||||||
|
Loading…
Reference in New Issue
Block a user