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:
1 parent
8d456c7d1a
commit
3d3c3b48fe
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user