From 95997d27106daf91336847f50efaaa32279b7fc7 Mon Sep 17 00:00:00 2001 From: saturneric Date: Mon, 16 Oct 2023 17:54:05 +0800 Subject: fix: check and update copyright at files --- src/core/function/gpg/GpgUIDOperator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/function/gpg/GpgUIDOperator.h') diff --git a/src/core/function/gpg/GpgUIDOperator.h b/src/core/function/gpg/GpgUIDOperator.h index c4a7d87b..05a6c0df 100644 --- a/src/core/function/gpg/GpgUIDOperator.h +++ b/src/core/function/gpg/GpgUIDOperator.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2021 Saturneric + * Copyright (C) 2021 Saturneric * * This file is part of GpgFrontend. * @@ -20,7 +20,7 @@ * the gpg4usb project, which is under GPL-3.0-or-later. * * All the source code of GpgFrontend was modified and released by - * Saturneric starting on May 12, 2021. + * Saturneric starting on May 12, 2021. * * SPDX-License-Identifier: GPL-3.0-or-later * -- cgit v1.2.3 From 8fdeb3af49999f29e017b7f7a70bd36f020ba721 Mon Sep 17 00:00:00 2001 From: saturneric Date: Mon, 23 Oct 2023 18:27:25 +0800 Subject: perf: reduce header includes and improve build speed --- src/core/function/gpg/GpgUIDOperator.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/core/function/gpg/GpgUIDOperator.h') diff --git a/src/core/function/gpg/GpgUIDOperator.h b/src/core/function/gpg/GpgUIDOperator.h index 05a6c0df..7d92b843 100644 --- a/src/core/function/gpg/GpgUIDOperator.h +++ b/src/core/function/gpg/GpgUIDOperator.h @@ -26,8 +26,7 @@ * */ -#ifndef GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H -#define GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H +#pragma once #include "core/GpgContext.h" #include "core/GpgModel.h" @@ -89,5 +88,3 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator }; } // namespace GpgFrontend - -#endif // GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H -- cgit v1.2.3 From 0251f35c93e3f0e0a6853a50fb5bd82c1b9e4187 Mon Sep 17 00:00:00 2001 From: saturneric Date: Mon, 6 Nov 2023 17:17:47 +0800 Subject: refactor: clean up core's codes --- src/core/function/gpg/GpgUIDOperator.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/function/gpg/GpgUIDOperator.h') diff --git a/src/core/function/gpg/GpgUIDOperator.h b/src/core/function/gpg/GpgUIDOperator.h index 7d92b843..02ea7b5f 100644 --- a/src/core/function/gpg/GpgUIDOperator.h +++ b/src/core/function/gpg/GpgUIDOperator.h @@ -28,8 +28,8 @@ #pragma once -#include "core/GpgContext.h" #include "core/GpgModel.h" +#include "core/function/gpg/GpgContext.h" namespace GpgFrontend { /** @@ -53,7 +53,7 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator * @param uid uid args(combine name&comment&email) * @return if successful */ - bool AddUID(const GpgKey& key, const std::string& uid); + auto AddUID(const GpgKey& key, const std::string& uid) -> bool; /** * create a new uid in certain key pair @@ -63,8 +63,8 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator * @param email * @return */ - bool AddUID(const GpgKey& key, const std::string& name, - const std::string& comment, const std::string& email); + auto AddUID(const GpgKey& key, const std::string& name, + const std::string& comment, const std::string& email) -> bool; /** * Revoke(Delete) UID from certain key pair @@ -72,7 +72,7 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator * @param uid target uid * @return if successful */ - bool RevUID(const GpgKey& key, const std::string& uid); + auto RevUID(const GpgKey& key, const std::string& uid) -> bool; /** * Set one of a uid of a key pair as primary @@ -80,7 +80,7 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator * @param uid target uid * @return if successful */ - bool SetPrimaryUID(const GpgKey& key, const std::string& uid); + auto SetPrimaryUID(const GpgKey& key, const std::string& uid) -> bool; private: GpgContext& ctx_ = -- cgit v1.2.3 From 4dcd2ac8c4f673fc21c4cf0072d6cb648ca64e7e Mon Sep 17 00:00:00 2001 From: saturneric Date: Tue, 7 Nov 2023 15:57:28 +0800 Subject: refactor: separate typedef and impl --- src/core/function/gpg/GpgUIDOperator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/function/gpg/GpgUIDOperator.h') diff --git a/src/core/function/gpg/GpgUIDOperator.h b/src/core/function/gpg/GpgUIDOperator.h index 02ea7b5f..982f8d08 100644 --- a/src/core/function/gpg/GpgUIDOperator.h +++ b/src/core/function/gpg/GpgUIDOperator.h @@ -28,8 +28,8 @@ #pragma once -#include "core/GpgModel.h" #include "core/function/gpg/GpgContext.h" +#include "core/typedef/GpgTypedef.h" namespace GpgFrontend { /** -- cgit v1.2.3 From bf538056b24a68b8fd235b1c50991ee8eb46a776 Mon Sep 17 00:00:00 2001 From: saturneric Date: Fri, 12 Jan 2024 14:02:37 +0800 Subject: refactor: use QString instead of std::string and improve threading system --- src/core/function/gpg/GpgUIDOperator.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/function/gpg/GpgUIDOperator.h') diff --git a/src/core/function/gpg/GpgUIDOperator.h b/src/core/function/gpg/GpgUIDOperator.h index 982f8d08..b2cec8bc 100644 --- a/src/core/function/gpg/GpgUIDOperator.h +++ b/src/core/function/gpg/GpgUIDOperator.h @@ -53,7 +53,7 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator * @param uid uid args(combine name&comment&email) * @return if successful */ - auto AddUID(const GpgKey& key, const std::string& uid) -> bool; + auto AddUID(const GpgKey& key, const QString& uid) -> bool; /** * create a new uid in certain key pair @@ -63,8 +63,8 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator * @param email * @return */ - auto AddUID(const GpgKey& key, const std::string& name, - const std::string& comment, const std::string& email) -> bool; + auto AddUID(const GpgKey& key, const QString& name, const QString& comment, + const QString& email) -> bool; /** * Revoke(Delete) UID from certain key pair @@ -72,7 +72,7 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator * @param uid target uid * @return if successful */ - auto RevUID(const GpgKey& key, const std::string& uid) -> bool; + auto RevUID(const GpgKey& key, const QString& uid) -> bool; /** * Set one of a uid of a key pair as primary @@ -80,7 +80,7 @@ class GPGFRONTEND_CORE_EXPORT GpgUIDOperator * @param uid target uid * @return if successful */ - auto SetPrimaryUID(const GpgKey& key, const std::string& uid) -> bool; + auto SetPrimaryUID(const GpgKey& key, const QString& uid) -> bool; private: GpgContext& ctx_ = -- cgit v1.2.3