diff options
author | saturneric <[email protected]> | 2024-01-15 09:22:32 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-15 09:22:32 +0000 |
commit | 6c632d70b391f8b317c68f7db8cfd217f9370995 (patch) | |
tree | 4136eb7164d9f910527c0392d12bd4854a2fdcff /src/core/function/DataObjectOperator.h | |
parent | refactor: remove boost and use QString instead of std::filesystem::path (diff) | |
download | GpgFrontend-6c632d70b391f8b317c68f7db8cfd217f9370995.tar.gz GpgFrontend-6c632d70b391f8b317c68f7db8cfd217f9370995.zip |
feat: use qt json support components in data object and infos gathering module
Diffstat (limited to 'src/core/function/DataObjectOperator.h')
-rw-r--r-- | src/core/function/DataObjectOperator.h | 11 |
1 files changed, 4 insertions, 7 deletions
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 <nlohmann/json.hpp> #include <optional> #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<nlohmann::json>; + auto GetDataObject(const QString &_key) -> std::optional<QJsonDocument>; - auto GetDataObjectByRef(const QString &_ref) -> std::optional<nlohmann::json>; + auto GetDataObjectByRef(const QString &_ref) -> std::optional<QJsonDocument>; 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 }; |