| 47 | } |
| 48 | |
| 49 | void VisConnector::addSolution(const QJsonObject& solution, qint64 time) |
| 50 | { |
| 51 | auto solIndex = _solutionCount++; |
| 52 | for (auto it = solution.begin(); it != solution.end(); it++) { |
| 53 | QJsonObject sol({{"time", time}, |
| 54 | {"data", it.value()}, |
| 55 | {"index", solIndex}}); |
| 56 | if (_solutions.contains(it.key())) { |
| 57 | _solutions[it.key()].append(sol); |
| 58 | } |
| 59 | } |
| 60 | QJsonObject obj({{"event", "solution"}, |
| 61 | {"time", time}, |
| 62 | {"solution", solution}, |
| 63 | {"index", solIndex}}); |
| 64 | broadcastMessage(QJsonDocument(obj)); |
| 65 | } |
| 66 | |
| 67 | void VisConnector::setFinalStatus(const QString& status, qint64 time) |
| 68 | { |
no test coverage detected