diff options
Diffstat (limited to 'src/core/utils/CacheUtils.cpp')
-rw-r--r-- | src/core/utils/CacheUtils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/utils/CacheUtils.cpp b/src/core/utils/CacheUtils.cpp index 32c7ac66..575634ae 100644 --- a/src/core/utils/CacheUtils.cpp +++ b/src/core/utils/CacheUtils.cpp @@ -32,18 +32,18 @@ namespace GpgFrontend { -void SetTempCacheValue(const std::string& key, const std::string& value) { - nlohmann::json cache_json = value; +void SetTempCacheValue(const QString& key, const QString& value) { + nlohmann::json cache_json = value.toStdString(); CacheManager::GetInstance().SaveCache(key, cache_json); } -auto GetTempCacheValue(const std::string& key) -> std::string { +auto GetTempCacheValue(const QString& key) -> QString { nlohmann::json cache_json = ""; cache_json = CacheManager::GetInstance().LoadCache(key, cache_json); - return cache_json.template get<std::string>(); + return QString::fromStdString(cache_json.template get<std::string>()); } -void ResetTempCacheValue(const std::string& key) { +void ResetTempCacheValue(const QString& key) { CacheManager::GetInstance().ResetCache(key); } |