* @brief Returns the templates manifest as a QJsonDocument, or empty on error. */
| 5494 | * @brief Returns the templates manifest as a QJsonDocument, or empty on error. |
| 5495 | */ |
| 5496 | static 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. |
no test coverage detected