diff options
author | Adriaan de Groot <groot@kde.org> | 2019-02-11 09:23:50 -0500 |
---|---|---|
committer | Adriaan de Groot <groot@kde.org> | 2019-02-11 09:23:50 -0500 |
commit | 04b4e37bd0a1bdac0a04d4050c25f28227f1fd36 (patch) | |
tree | 5292d8f4f1369a7a10e67366446a31007b4a2935 | |
parent | 0fdc73796897dae348cda5096a23795c5478435b (diff) |
[partition] Don't display unsupported swap styles
- Suppress unsupported options while reading the config file.
-rw-r--r-- | src/modules/partition/gui/PartitionViewStep.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index ac0599de7..b7433450d 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -612,19 +612,20 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) else choices.insert( PartitionActions::Choices::SwapChoice::SmallSwap ); } - m_swapChoices = choices; // Not all are supported right now // FIXME static const char unsupportedSetting[] = "Partition-module does not support *userSwapChoices* setting"; #define COMPLAIN_UNSUPPORTED(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::ReuseSwap ) #undef COMPLAIN_UNSUPPORTED + m_swapChoices = choices; + // These gs settings seem to be unused (in upstream Calamares) outside of // the partition module itself. gs->insert( "ensureSuspendToDisk", ensureSuspendToDisk ); |