mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +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
@@ -13,7 +13,6 @@
|
||||
#include "blackmisc/compare.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/directoryutils.h"
|
||||
#include "blackmisc/json.h"
|
||||
#include "blackmisc/logcategory.h"
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
@@ -331,7 +330,7 @@ namespace BlackCore
|
||||
{
|
||||
const CGlobalSetup currentSetup = m_setup.get();
|
||||
CGlobalSetup loadedSetup;
|
||||
loadedSetup.convertFromJson(Json::jsonObjectFromString(setupJson));
|
||||
loadedSetup.convertFromJson(setupJson);
|
||||
loadedSetup.markAsLoaded(true);
|
||||
if (lastModified > 0 && lastModified > loadedSetup.getMSecsSinceEpoch()) { loadedSetup.setMSecsSinceEpoch(lastModified); }
|
||||
bool sameVersionLoaded = (loadedSetup == currentSetup);
|
||||
@@ -422,9 +421,7 @@ namespace BlackCore
|
||||
{
|
||||
try
|
||||
{
|
||||
const CDistributionList loadedDistributions = CDistributionList::fromDatabaseJson(
|
||||
Json::jsonArrayFromString(distributionJson)
|
||||
);
|
||||
const CDistributionList loadedDistributions = CDistributionList::fromDatabaseJson(distributionJson);
|
||||
if (loadedDistributions.isEmpty())
|
||||
{
|
||||
CLogMessage(this).error("Loading of distribution yielded no data");
|
||||
|
||||
Reference in New Issue
Block a user