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

Function consolidateDate

YACReaderLibrary/xml_info_parser.cpp:54–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void consolidateDate(ComicInfo &info)
55{
56 if (!info.year.isValid() && !info.month.isValid() && !info.day.isValid()) {
57 return;
58 }
59
60 auto year = info.year.isNull() ? 0 : info.year.toInt();
61 auto month = info.month.isNull() ? 1 : info.month.toInt();
62 auto day = info.day.isNull() ? 1 : info.day.toInt();
63
64 info.date = QString("%1/%2/%3").arg(day).arg(month).arg(year);
65}
66
67bool tryValues(QXmlStreamReader &reader, ComicInfo &info)
68{

Callers 1

parseXMLIntoInfoMethod · 0.85

Calls 2

QStringClass · 0.70
isValidMethod · 0.45

Tested by

no test coverage detected