mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T125, allow to get distribution list by JSON string. Also setup value object directly using JSON string now.
This commit is contained in:
committed by
Mathew Sutcliffe
parent
15f5a7f489
commit
8c032fb4d7
@@ -70,5 +70,11 @@ namespace BlackMisc
|
||||
}
|
||||
return distributions;
|
||||
}
|
||||
|
||||
CDistributionList CDistributionList::fromDatabaseJson(const QString &json)
|
||||
{
|
||||
if (json.isEmpty()) { return CDistributionList(); }
|
||||
return CDistributionList::fromDatabaseJson(Json::jsonArrayFromString(json));
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -59,6 +59,9 @@ namespace BlackMisc
|
||||
|
||||
//! From database JSON
|
||||
static CDistributionList fromDatabaseJson(const QJsonArray &array);
|
||||
|
||||
//! From database JSON
|
||||
static CDistributionList fromDatabaseJson(const QString &json);
|
||||
};
|
||||
|
||||
//! Trait for global setup data
|
||||
|
||||
Reference in New Issue
Block a user