diff options
author | saturneric <[email protected]> | 2024-01-12 06:02:37 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-12 06:02:37 +0000 |
commit | bf538056b24a68b8fd235b1c50991ee8eb46a776 (patch) | |
tree | e1bab54095b80df62b321fb5bd69453f9f951b05 /src/core/function/DataObjectOperator.h | |
parent | feat: improve api and ui of keys import and export (diff) | |
download | GpgFrontend-bf538056b24a68b8fd235b1c50991ee8eb46a776.tar.gz GpgFrontend-bf538056b24a68b8fd235b1c50991ee8eb46a776.zip |
refactor: use QString instead of std::string and improve threading system
Diffstat (limited to 'src/core/function/DataObjectOperator.h')
-rw-r--r-- | src/core/function/DataObjectOperator.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/core/function/DataObjectOperator.h b/src/core/function/DataObjectOperator.h index 06455211..a262bfc2 100644 --- a/src/core/function/DataObjectOperator.h +++ b/src/core/function/DataObjectOperator.h @@ -28,7 +28,6 @@ #pragma once -#include <boost/format.hpp> #include <nlohmann/json.hpp> #include <optional> @@ -48,13 +47,11 @@ class GPGFRONTEND_CORE_EXPORT DataObjectOperator explicit DataObjectOperator( int channel = SingletonFunctionObject::GetDefaultChannel()); - auto SaveDataObj(const std::string &_key, const nlohmann::json &value) - -> std::string; + auto SaveDataObj(const QString &_key, const nlohmann::json &value) -> QString; - auto GetDataObject(const std::string &_key) -> std::optional<nlohmann::json>; + auto GetDataObject(const QString &_key) -> std::optional<nlohmann::json>; - auto GetDataObjectByRef(const std::string &_ref) - -> std::optional<nlohmann::json>; + auto GetDataObjectByRef(const QString &_ref) -> std::optional<nlohmann::json>; private: /** @@ -75,9 +72,7 @@ class GPGFRONTEND_CORE_EXPORT DataObjectOperator ///< object is ///< stored - std::random_device rd_; ///< Random device - std::mt19937 mt_ = std::mt19937(rd_()); ///< Mersenne twister - QByteArray hash_key_; ///< Hash key + QByteArray hash_key_; ///< Hash key }; } // namespace GpgFrontend |