aboutsummaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/common/CoreCommonUtil.cpp10
-rw-r--r--src/core/common/CoreCommonUtil.h6
-rw-r--r--src/core/function/gpg/GpgKeyImportExporter.cpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/core/common/CoreCommonUtil.cpp b/src/core/common/CoreCommonUtil.cpp
index 9d0d0bd5..93cad60a 100644
--- a/src/core/common/CoreCommonUtil.cpp
+++ b/src/core/common/CoreCommonUtil.cpp
@@ -32,25 +32,25 @@ namespace GpgFrontend {
std::unique_ptr<CoreCommonUtil> CoreCommonUtil::instance_ = nullptr; ///<
-CoreCommonUtil *CoreCommonUtil::GetInstance() {
+CoreCommonUtil* CoreCommonUtil::GetInstance() {
if (instance_ == nullptr) {
instance_ = std::make_unique<CoreCommonUtil>();
}
return instance_.get();
}
-void CoreCommonUtil::SetTempCacheValue(const std::string key,
- const std::string value) {
+void CoreCommonUtil::SetTempCacheValue(const std::string& key,
+ const std::string& value) {
temp_cache_[key] = value;
}
-std::string CoreCommonUtil::GetTempCacheValue(const std::string key) {
+std::string CoreCommonUtil::GetTempCacheValue(const std::string& key) {
std::string temp_cache_value;
std::swap(temp_cache_value, temp_cache_[key]);
return temp_cache_value;
}
-void CoreCommonUtil::ResetTempCacheValue(const std::string key) {
+void CoreCommonUtil::ResetTempCacheValue(const std::string& key) {
std::string temp_cache_value;
std::swap(temp_cache_value, temp_cache_[key]);
}
diff --git a/src/core/common/CoreCommonUtil.h b/src/core/common/CoreCommonUtil.h
index 6cbf6405..58bb4d40 100644
--- a/src/core/common/CoreCommonUtil.h
+++ b/src/core/common/CoreCommonUtil.h
@@ -52,7 +52,7 @@ class GPGFRONTEND_CORE_EXPORT CoreCommonUtil : public QObject {
* @brief set a temp cache under a certain key
*
*/
- void SetTempCacheValue(const std::string, const std::string);
+ void SetTempCacheValue(const std::string &, const std::string &);
/**
* @brief after get the temp cache, its value will be imediately ease in
@@ -60,14 +60,14 @@ class GPGFRONTEND_CORE_EXPORT CoreCommonUtil : public QObject {
*
* @return std::string
*/
- std::string GetTempCacheValue(const std::string);
+ std::string GetTempCacheValue(const std::string &);
/**
* @brief imediately ease temp cache in storage
*
* @return std::string
*/
- void ResetTempCacheValue(const std::string);
+ void ResetTempCacheValue(const std::string &);
signals:
diff --git a/src/core/function/gpg/GpgKeyImportExporter.cpp b/src/core/function/gpg/GpgKeyImportExporter.cpp
index 81f67e78..01349c94 100644
--- a/src/core/function/gpg/GpgKeyImportExporter.cpp
+++ b/src/core/function/gpg/GpgKeyImportExporter.cpp
@@ -133,7 +133,7 @@ bool GpgFrontend::GpgKeyImportExporter::ExportAllKeys(
result = ExportKeys(uid_list, temp_buffer, true) & result;
}
out_buffer->append(*temp_buffer);
- return true;
+ return result;
}
/**