[partition] Tidy formatting of enum tables
- the NamedEnumTable is one of the things that clang-format doesn't do nicely.
This commit is contained in:
parent
db20b79ac0
commit
f31056faae
@ -25,23 +25,36 @@ Config::Config( QObject* parent )
|
|||||||
const NamedEnumTable< Config::InstallChoice >&
|
const NamedEnumTable< Config::InstallChoice >&
|
||||||
Config::installChoiceNames()
|
Config::installChoiceNames()
|
||||||
{
|
{
|
||||||
static const NamedEnumTable< InstallChoice > names { { QStringLiteral( "none" ), InstallChoice::NoChoice },
|
// *INDENT-OFF*
|
||||||
{ QStringLiteral( "nochoice" ), InstallChoice::NoChoice },
|
// clang-format off
|
||||||
{ QStringLiteral( "alongside" ), InstallChoice::Alongside },
|
static const NamedEnumTable< InstallChoice > names {
|
||||||
{ QStringLiteral( "erase" ), InstallChoice::Erase },
|
{ QStringLiteral( "none" ), InstallChoice::NoChoice },
|
||||||
{ QStringLiteral( "replace" ), InstallChoice::Replace },
|
{ QStringLiteral( "nochoice" ), InstallChoice::NoChoice },
|
||||||
{ QStringLiteral( "manual" ), InstallChoice::Manual } };
|
{ QStringLiteral( "alongside" ), InstallChoice::Alongside },
|
||||||
|
{ QStringLiteral( "erase" ), InstallChoice::Erase },
|
||||||
|
{ QStringLiteral( "replace" ), InstallChoice::Replace },
|
||||||
|
{ QStringLiteral( "manual" ), InstallChoice::Manual },
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
// *INDENT-ON*
|
||||||
|
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
const NamedEnumTable< Config::SwapChoice >&
|
const NamedEnumTable< Config::SwapChoice >&
|
||||||
Config::swapChoiceNames()
|
Config::swapChoiceNames()
|
||||||
{
|
{
|
||||||
static const NamedEnumTable< SwapChoice > names { { QStringLiteral( "none" ), SwapChoice::NoSwap },
|
// *INDENT-OFF*
|
||||||
{ QStringLiteral( "small" ), SwapChoice::SmallSwap },
|
// clang-format off
|
||||||
{ QStringLiteral( "suspend" ), SwapChoice::FullSwap },
|
static const NamedEnumTable< SwapChoice > names {
|
||||||
{ QStringLiteral( "reuse" ), SwapChoice::ReuseSwap },
|
{ QStringLiteral( "none" ), SwapChoice::NoSwap },
|
||||||
{ QStringLiteral( "file" ), SwapChoice::SwapFile } };
|
{ QStringLiteral( "small" ), SwapChoice::SmallSwap },
|
||||||
|
{ QStringLiteral( "suspend" ), SwapChoice::FullSwap },
|
||||||
|
{ QStringLiteral( "reuse" ), SwapChoice::ReuseSwap },
|
||||||
|
{ QStringLiteral( "file" ), SwapChoice::SwapFile },
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
// *INDENT-ON*
|
||||||
|
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
@ -49,8 +62,14 @@ Config::swapChoiceNames()
|
|||||||
const NamedEnumTable< Config::LuksGeneration >&
|
const NamedEnumTable< Config::LuksGeneration >&
|
||||||
Config::luksGenerationNames()
|
Config::luksGenerationNames()
|
||||||
{
|
{
|
||||||
static const NamedEnumTable< LuksGeneration > names { { QStringLiteral( "luks1" ), LuksGeneration::Luks1 },
|
// *INDENT-OFF*
|
||||||
{ QStringLiteral( "luks2" ), LuksGeneration::Luks2 } };
|
// clang-format off
|
||||||
|
static const NamedEnumTable< LuksGeneration > names {
|
||||||
|
{ QStringLiteral( "luks1" ), LuksGeneration::Luks1 },
|
||||||
|
{ QStringLiteral( "luks2" ), LuksGeneration::Luks2 },
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
// *INDENT-ON*
|
||||||
|
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user