Adds immediate migration results

This commit is contained in:
torsten committed 2026-08-18 22:12:24 +02:00
1 parent ba4121728b
commit 6a2a0667ab
2395 files changed
+357322 -2524

No files matched your search

@@ -8,6 +8,7 @@
#include "web_socket_server.h"
#include <utility>
#include <QJsonArray>
#include <QJsonDocument>
@@ -34,7 +35,7 @@ WebSocketEventServer::WebSocketEventServer(const QSqlDatabase &db, QObject *pare
WebSocketEventServer::~WebSocketEventServer()
{
for (auto s : qAsConst(m_liveSockets))
for (auto s : std::as_const(m_liveSockets))
{
s->disconnect(this);
s->close();
@@ -83,7 +84,7 @@ void WebSocketEventServer::sendEvent(const QJsonObject &obj)
{
const QJsonDocument doc(obj);
const QString msg = QString::fromUtf8(doc.toJson(QJsonDocument::Compact));
for (QWebSocket *ws : qAsConst(m_liveSockets))
for (QWebSocket *ws : std::as_const(m_liveSockets))
ws->sendTextMessage(msg);
m_liveHistory[time(nullptr)].push_back(msg);
}
@@ -104,7 +105,7 @@ void WebSocketEventServer::onNewConnection()
{
connect(ws, &QWebSocket::disconnected,
this, &WebSocketEventServer::onSocketDisconnected);
for (const auto &historyVec : qAsConst(m_liveHistory))
for (const auto &historyVec : std::as_const(m_liveHistory))
{
for (const auto &msg : historyVec)
ws->sendTextMessage(msg);