MCPcopy Create free account
hub / github.com/YACReader/yacreader / parseXMLIntoInfo

Method parseXMLIntoInfo

YACReaderLibrary/xml_info_parser.cpp:170–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170bool YACReader::parseXMLIntoInfo(const QByteArray &xmlRawData, ComicInfo &info)
171{
172 if (xmlRawData.isEmpty()) {
173 return false;
174 }
175
176 QXmlStreamReader reader(xmlRawData);
177
178 bool someDataWasParsed = false;
179
180 while (reader.readNextStartElement()) {
181 if (tryValues(reader, info)) {
182 someDataWasParsed = true | someDataWasParsed;
183 } else {
184 if (reader.name() != QString("ComicInfo")) {
185 reader.skipCurrentElement();
186 }
187 }
188 }
189
190 consolidateDate(info);
191
192 if (reader.error()) {
193 return false;
194 }
195
196 return someDataWasParsed;
197}

Callers

nothing calls this directly

Calls 6

tryValuesFunction · 0.85
consolidateDateFunction · 0.85
isEmptyMethod · 0.80
errorMethod · 0.80
QStringClass · 0.70
nameMethod · 0.45

Tested by

no test coverage detected