MCPcopy Create free account
hub / github.com/LongSoft/UEFITool / itemSubtypeToQString

Function itemSubtypeToQString

types.cpp:65–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65QString itemSubtypeToQString(const UINT8 type, const UINT8 subtype)
66{
67 switch (type) {
68 case Types::Root:
69 case Types::Image:
70 if (subtype == Subtypes::IntelImage)
71 return QObject::tr("Intel");
72 else if (subtype == Subtypes::UefiImage)
73 return QObject::tr("UEFI");
74 else
75 return QObject::tr("Unknown subtype");
76 case Types::Padding:
77 if (subtype == Subtypes::ZeroPadding)
78 return QObject::tr("Empty (0x00)");
79 else if (subtype == Subtypes::OnePadding)
80 return QObject::tr("Empty (0xFF)");
81 else if (subtype == Subtypes::DataPadding)
82 return QObject::tr("Non-empty");
83 else
84 return QObject::tr("Unknown subtype");
85 case Types::Volume:
86 if (subtype == Subtypes::UnknownVolume)
87 return QObject::tr("Unknown");
88 else if (subtype == Subtypes::Ffs2Volume)
89 return QObject::tr("FFSv2");
90 else if (subtype == Subtypes::Ffs3Volume)
91 return QObject::tr("FFSv3");
92 else
93 return QObject::tr("Unknown subtype");
94 case Types::Capsule:
95 if (subtype == Subtypes::AptioSignedCapsule)
96 return QObject::tr("Aptio signed");
97 else if (subtype == Subtypes::AptioUnsignedCapsule)
98 return QObject::tr("Aptio unsigned");
99 else if (subtype == Subtypes::UefiCapsule)
100 return QObject::tr("UEFI 2.0");
101 else if (subtype == Subtypes::ToshibaCapsule)
102 return QObject::tr("Toshiba");
103 else
104 return QObject::tr("Unknown subtype");
105 case Types::Region:
106 return regionTypeToQString(subtype);
107 case Types::File:
108 return fileTypeToQString(subtype);
109 case Types::Section:
110 return sectionTypeToQString(subtype);
111 case Types::FreeSpace:
112 return QString();
113 default:
114 return QObject::tr("Unknown subtype");
115 }
116}
117
118QString compressionTypeToQString(const UINT8 algorithm)
119{

Callers 2

dataMethod · 0.85
recursiveDumpMethod · 0.85

Calls 3

regionTypeToQStringFunction · 0.85
fileTypeToQStringFunction · 0.85
sectionTypeToQStringFunction · 0.85

Tested by

no test coverage detected