mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #923, use CVariant JSON to load/save from view
This commit is contained in:
committed by
Mathew Sutcliffe
parent
864e64e295
commit
ff4b37b3fe
@@ -752,13 +752,15 @@ namespace BlackGui
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
QJsonObject CListModelBase<ObjectType, ContainerType, UseCompare>::toJson() const
|
||||
{
|
||||
return container().toJson();
|
||||
const CVariant variant = CVariant::fromValue(container());
|
||||
return variant.toJson();
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
QString CListModelBase<ObjectType, ContainerType, UseCompare>::toJsonString(QJsonDocument::JsonFormat format) const
|
||||
{
|
||||
return container().toJsonString(format);
|
||||
const CVariant variant = CVariant::fromValue(container());
|
||||
return variant.toJsonString(format);
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
|
||||
Reference in New Issue
Block a user