* @brief Validates actions (non-blocking sanity checks: titles, payloads). */
| 5784 | * @brief Validates actions (non-blocking sanity checks: titles, payloads). |
| 5785 | */ |
| 5786 | static void validateActions(const std::vector<DataModel::Action>& actions, QJsonArray& issues) |
| 5787 | { |
| 5788 | for (const auto& a : actions) { |
| 5789 | const QString aloc = QStringLiteral("action[%1]").arg(a.actionId); |
| 5790 | if (a.title.trimmed().isEmpty()) |
| 5791 | addIssue(issues, QStringLiteral("warning"), aloc, QStringLiteral("Action has no title")); |
| 5792 | |
| 5793 | if (a.txData.isEmpty()) |
| 5794 | addIssue( |
| 5795 | issues, QStringLiteral("warning"), aloc, QStringLiteral("Action has no payload (txData)")); |
| 5796 | } |
| 5797 | } |
| 5798 | |
| 5799 | /** |
| 5800 | * @brief Walks the project model, reports inconsistencies. |