diff options
author | Adriaan de Groot <groot@kde.org> | 2019-02-11 09:06:27 -0500 |
---|---|---|
committer | Adriaan de Groot <groot@kde.org> | 2019-02-11 09:06:27 -0500 |
commit | 2fda5957f1139772961e28f191ea52e4641ce998 (patch) | |
tree | 5f50f0e62c8597d7e3c0aafd816b178232c9add9 | |
parent | 273461a497d0b8e137ff6af6614efe0a969f5779 (diff) |
[partition] Complain about unsupported swap choices
-rw-r--r-- | src/modules/partition/gui/PartitionViewStep.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 503924860..02af39bfa 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -614,6 +614,17 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } 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 ); } + + COMPLAIN_UNSUPPORTED( PartitionActions::Choices::SwapChoice::SwapFile ) + COMPLAIN_UNSUPPORTED( PartitionActions::Choices::SwapChoice::ReuseSwap ) +#undef COMPLAIN_UNSUPPORTED + // These gs settings seem to be unused (in upstream Calamares) outside of // the partition module itself. gs->insert( "ensureSuspendToDisk", ensureSuspendToDisk ); |