* @brief Projects a per-op result blob onto just the identity/status fields the model needs. */
| 1361 | * @brief Projects a per-op result blob onto just the identity/status fields the model needs. |
| 1362 | */ |
| 1363 | static QJsonObject compactBatchRowResult(const QJsonObject& opResult) |
| 1364 | { |
| 1365 | static const QStringList kIdentityKeys = { |
| 1366 | QStringLiteral("widgetId"), |
| 1367 | QStringLiteral("widgetType"), |
| 1368 | QStringLiteral("widgetTypeSlug"), |
| 1369 | QStringLiteral("workspaceId"), |
| 1370 | QStringLiteral("groupId"), |
| 1371 | QString(Keys::DatasetId), |
| 1372 | QString(Keys::UniqueId), |
| 1373 | QStringLiteral("id"), |
| 1374 | QStringLiteral("title"), |
| 1375 | QStringLiteral("index"), |
| 1376 | QStringLiteral("relativeIndex"), |
| 1377 | QStringLiteral("added"), |
| 1378 | QStringLiteral("removed"), |
| 1379 | QStringLiteral("deleted"), |
| 1380 | QStringLiteral("updated"), |
| 1381 | QStringLiteral("renamed"), |
| 1382 | QStringLiteral("cleared"), |
| 1383 | }; |
| 1384 | |
| 1385 | QJsonObject slim; |
| 1386 | for (const auto& key : kIdentityKeys) { |
| 1387 | const auto v = opResult.value(key); |
| 1388 | if (!v.isUndefined() && !v.isNull()) |
| 1389 | slim.insert(key, v); |
| 1390 | } |
| 1391 | return slim; |
| 1392 | } |
| 1393 | |
| 1394 | /** |
| 1395 | * @brief True when a fanned-out inner command (Safe/Confirm tier) may run without an extra |
no test coverage detected