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

Function guidToQString

ffs.cpp:88–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88QString guidToQString(const EFI_GUID& guid)
89{
90 QByteArray baGuid = QByteArray::fromRawData((const char*)guid.Data, sizeof(EFI_GUID));
91 const UINT32 i32 = *(const UINT32*)baGuid.left(4).constData();
92 const UINT16 i16_0 = *(const UINT16*)baGuid.mid(4, 2).constData();
93 const UINT16 i16_1 = *(const UINT16*)baGuid.mid(6, 2).constData();
94 const UINT8 i8_0 = *(const UINT8*)baGuid.mid(8, 1).constData();
95 const UINT8 i8_1 = *(const UINT8*)baGuid.mid(9, 1).constData();
96 const UINT8 i8_2 = *(const UINT8*)baGuid.mid(10, 1).constData();
97 const UINT8 i8_3 = *(const UINT8*)baGuid.mid(11, 1).constData();
98 const UINT8 i8_4 = *(const UINT8*)baGuid.mid(12, 1).constData();
99 const UINT8 i8_5 = *(const UINT8*)baGuid.mid(13, 1).constData();
100 const UINT8 i8_6 = *(const UINT8*)baGuid.mid(14, 1).constData();
101 const UINT8 i8_7 = *(const UINT8*)baGuid.mid(15, 1).constData();
102
103 return QString("%1-%2-%3-%4%5-%6%7%8%9%10%11")
104 .arg(i32, 8, 16, QChar('0'))
105 .arg(i16_0, 4, 16, QChar('0'))
106 .arg(i16_1, 4, 16, QChar('0'))
107 .arg(i8_0, 2, 16, QChar('0'))
108 .arg(i8_1, 2, 16, QChar('0'))
109 .arg(i8_2, 2, 16, QChar('0'))
110 .arg(i8_3, 2, 16, QChar('0'))
111 .arg(i8_4, 2, 16, QChar('0'))
112 .arg(i8_5, 2, 16, QChar('0'))
113 .arg(i8_6, 2, 16, QChar('0'))
114 .arg(i8_7, 2, 16, QChar('0')).toUpper();
115}
116
117QString fileTypeToQString(const UINT8 type)
118{

Callers 8

parseImageFileMethod · 0.85
parseVolumeMethod · 0.85
parseFileMethod · 0.85
parseDepexSectionMethod · 0.85
parseSectionMethod · 0.85
reconstructSectionMethod · 0.85
recursiveDumpMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected