mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-23 10:25:45 -05:00
[libcalamares] Don't write out pragmas by hand, use Qt helpers
This commit is contained in:
parent
f4d62f0f41
commit
16cb360a69
1 changed files with 6 additions and 14 deletions
|
@ -22,10 +22,8 @@ namespace Partition
|
|||
QString
|
||||
prettyNameForFileSystemType( FileSystem::Type t )
|
||||
{
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wswitch-enum"
|
||||
#endif
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG( "-Wswitch-enum" )
|
||||
// 13 enumeration values not handled
|
||||
switch ( t )
|
||||
{
|
||||
|
@ -66,18 +64,14 @@ prettyNameForFileSystemType( FileSystem::Type t )
|
|||
default:
|
||||
return FileSystem::nameForType( t );
|
||||
}
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
QString
|
||||
untranslatedFS( FileSystem::Type t )
|
||||
{
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wswitch-enum"
|
||||
#endif
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG( "-Wswitch-enum" )
|
||||
// 34 enumeration values not handled
|
||||
switch ( t )
|
||||
{
|
||||
|
@ -86,9 +80,7 @@ untranslatedFS( FileSystem::Type t )
|
|||
default:
|
||||
return FileSystem::nameForType( t, { QStringLiteral( "C" ) } );
|
||||
}
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
} // namespace Partition
|
||||
|
|
Loading…
Add table
Reference in a new issue