From 6c632d70b391f8b317c68f7db8cfd217f9370995 Mon Sep 17 00:00:00 2001 From: saturneric Date: Mon, 15 Jan 2024 17:22:32 +0800 Subject: feat: use qt json support components in data object and infos gathering module --- src/core/function/DataObjectOperator.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/core/function/DataObjectOperator.h') diff --git a/src/core/function/DataObjectOperator.h b/src/core/function/DataObjectOperator.h index 3d0606d6..992b0c46 100644 --- a/src/core/function/DataObjectOperator.h +++ b/src/core/function/DataObjectOperator.h @@ -28,7 +28,6 @@ #pragma once -#include #include #include "core/function/GlobalSettingStation.h" @@ -47,11 +46,11 @@ class GPGFRONTEND_CORE_EXPORT DataObjectOperator explicit DataObjectOperator( int channel = SingletonFunctionObject::GetDefaultChannel()); - auto SaveDataObj(const QString &_key, const nlohmann::json &value) -> QString; + auto SaveDataObj(const QString &_key, const QJsonDocument &value) -> QString; - auto GetDataObject(const QString &_key) -> std::optional; + auto GetDataObject(const QString &_key) -> std::optional; - auto GetDataObjectByRef(const QString &_ref) -> std::optional; + auto GetDataObjectByRef(const QString &_ref) -> std::optional; private: /** @@ -69,9 +68,7 @@ class GPGFRONTEND_CORE_EXPORT DataObjectOperator app_secure_path_ + "/app.key"; ///< Where the key of data object is stored QString app_data_objs_path_ = - global_setting_station_.GetAppDataPath() + "/data_objs"; ///< Where data - ///< object is - ///< stored + global_setting_station_.GetAppDataPath() + "/data_objs"; QByteArray hash_key_; ///< Hash key }; -- cgit v1.2.3