* @brief Builds a failure envelope with an error code and optional hint. */
| 47 | * @brief Builds a failure envelope with an error code and optional hint. |
| 48 | */ |
| 49 | static QJsonObject failure(const QString& error, const QString& hint = {}) |
| 50 | { |
| 51 | QJsonObject out; |
| 52 | out[QStringLiteral("ok")] = false; |
| 53 | out[QStringLiteral("error")] = error; |
| 54 | if (!hint.isEmpty()) |
| 55 | out[QStringLiteral("hint")] = hint; |
| 56 | |
| 57 | return out; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * @brief Returns a workspace-relative display path, or the absolute path if outside. |
no test coverage detected