aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/UID.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-22 15:58:59 +0000
committerSaturneric <[email protected]>2021-05-22 15:58:59 +0000
commitd9121e76c7eeb63b23a6a772d38e61b60abfe93d (patch)
tree965f9f27bba242a584b73ef4947ce54fa652390f /src/gpg/UID.cpp
parentExpand and improve GpgKey; (diff)
downloadGpgFrontend-d9121e76c7eeb63b23a6a772d38e61b60abfe93d.tar.gz
GpgFrontend-d9121e76c7eeb63b23a6a772d38e61b60abfe93d.zip
Enhance code robustness;
Improve performance for GpgKey; Fix code defects. Makes the update response to changes in the key database directed. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rw-r--r--src/gpg/UID.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gpg/UID.cpp b/src/gpg/UID.cpp
new file mode 100644
index 00000000..a1147eec
--- /dev/null
+++ b/src/gpg/UID.cpp
@@ -0,0 +1,16 @@
+//
+// Created by eric on 2021/5/22.
+//
+
+#include "gpg/UID.h"
+
+UID::UID(gpgme_user_id_t user_id) :
+ uid(user_id->uid), name(user_id->name), email(user_id->email), comment(user_id->comment) {
+
+ auto sig = user_id->signatures;
+
+ while (sig != nullptr) {
+ signatures.push_back(Signature(sig));
+ }
+
+} \ No newline at end of file