mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:20:06 +00:00
Refactor json utility to wxdata, add ReadJsonString function
This commit is contained in:
parent
895e760fee
commit
9f33189c18
12 changed files with 245 additions and 228 deletions
|
|
@ -4,8 +4,8 @@
|
|||
#include <scwx/qt/types/qt_types.hpp>
|
||||
#include <scwx/qt/types/unit_types.hpp>
|
||||
#include <scwx/qt/util/geographic_lib.hpp>
|
||||
#include <scwx/qt/util/json.hpp>
|
||||
#include <scwx/common/geographic.hpp>
|
||||
#include <scwx/util/json.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
|
|
@ -117,7 +117,7 @@ void RadarSiteModelImpl::ReadPresets()
|
|||
// Determine if presets exists
|
||||
if (std::filesystem::exists(presetsPath_))
|
||||
{
|
||||
presetsJson = util::json::ReadJsonFile(presetsPath_);
|
||||
presetsJson = scwx::util::json::ReadJsonFile(presetsPath_);
|
||||
}
|
||||
|
||||
// If presets was successfully read
|
||||
|
|
@ -160,7 +160,7 @@ void RadarSiteModelImpl::WritePresets()
|
|||
logger_->info("Saving presets");
|
||||
|
||||
auto presetsJson = boost::json::value_from(presets_);
|
||||
util::json::WriteJsonFile(presetsPath_, presetsJson);
|
||||
scwx::util::json::WriteJsonFile(presetsPath_, presetsJson);
|
||||
}
|
||||
|
||||
int RadarSiteModel::rowCount(const QModelIndex& parent) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue