MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / loadTemplateManifest

Function loadTemplateManifest

app/src/API/Handlers/ProjectHandler.cpp:5496–5503  ·  view source on GitHub ↗

* @brief Returns the templates manifest as a QJsonDocument, or empty on error. */

Source from the content-addressed store, hash-verified

5494 * @brief Returns the templates manifest as a QJsonDocument, or empty on error.
5495 */
5496static QJsonDocument loadTemplateManifest()
5497{
5498 QFile f(QStringLiteral(":/ai/templates/manifest.json"));
5499 if (!f.open(QIODevice::ReadOnly | QIODevice::Text))
5500 return {};
5501
5502 return QJsonDocument::fromJson(f.readAll());
5503}
5504
5505/**
5506 * @brief Loads a template body file by id. Returns empty doc when not found.

Callers 2

loadTemplateBodyByIdFunction · 0.85
templateListMethod · 0.85

Calls 2

fromJsonFunction · 0.85
openMethod · 0.45

Tested by

no test coverage detected