MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / validate

Method validate

launcher/meta/BaseEntity.cpp:55–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 return true;
54 }
55 bool validate(QNetworkReply&) override
56 {
57 auto fname = m_entity->localFilename();
58 try {
59 auto doc = Json::requireDocument(m_data, fname);
60 auto obj = Json::requireObject(doc, fname);
61 m_entity->parse(obj);
62 return true;
63 } catch (const Exception& e) {
64 qWarning() << "Unable to parse response:" << e.cause();
65 return false;
66 }
67 }
68
69 private: /* data */
70 QByteArray m_data;

Callers

nothing calls this directly

Calls 5

requireDocumentFunction · 0.85
requireObjectFunction · 0.85
causeMethod · 0.80
localFilenameMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected