Qt6 API fixes: QJsonObject and QJsonDocument serialization

- training_area_telegrams.cpp:3168: Fixed QJsonObject initializer list syntax
  - Changed QJsonObject({{...}}) to QJsonObject{{...}} (double braces)
  - Changed header.toJson() to header().toJson() (method call)

- track_content_widget.cpp:37,51: Fixed QJsonDocument serialization
  - Replaced toBinaryData() with toJson(QJsonDocument::Compact)
  - Replaced fromBinaryData() with fromJson()
  - Qt6 removed binary serialization methods

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-23 18:38:42 +02:00
1 parent 8d456c7d1a
commit 3d3c3b48fe
2 files changed
+4 -4

No files matched your search

@@ -3165,14 +3165,14 @@ BatteryAlarm BatteryAlarm::fromJson(const QJsonObject &obj)
QJsonObject BatteryAlarm::toJson() const
{
return QJsonObject({{QStringLiteral("header"), header.toJson()},
return QJsonObject{{QStringLiteral("header"), header().toJson()},
{QStringLiteral("id"), id},
{QStringLiteral("description"), description},
{QStringLiteral("acknowledge"), acknowledge},
{QStringLiteral("condition"), condition},
{QStringLiteral("uniqueAlarmNumber"), uniqueAlarmNumber},
{QStringLiteral("alarmTime"), alarmTime}
});
};
}
ServiceControl ServiceControl::fromJson(const QJsonObject &obj)