aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/DataObjectOperator.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-15 09:22:32 +0000
committersaturneric <[email protected]>2024-01-15 09:22:32 +0000
commit6c632d70b391f8b317c68f7db8cfd217f9370995 (patch)
tree4136eb7164d9f910527c0392d12bd4854a2fdcff /src/core/function/DataObjectOperator.h
parentrefactor: remove boost and use QString instead of std::filesystem::path (diff)
downloadGpgFrontend-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.h11
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
};