aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/GpgContext.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-27 19:51:18 +0000
committerSaturneric <[email protected]>2021-05-27 19:51:18 +0000
commitad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc (patch)
treef01ad3ec20f85a17d433502e169eab99f2719b92 /src/gpg/GpgContext.cpp
parentFix the wrong use of the signing key interface. (diff)
downloadGpgFrontend-ad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc.tar.gz
GpgFrontend-ad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc.zip
Adjust part of the text of the UI interface of the UID operation tab.
Write an interface to increase UID. Write logic to adapt and increase UID. Adjust the UI of KeygenDialog. Delete the Close button of KeyDetailTab and its logic. Adjust the KeyDetailTab fingerprint and its copy button UI. Fix the problem of refreshing the order of the KeyPairUIDTab list. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rw-r--r--src/gpg/GpgContext.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gpg/GpgContext.cpp b/src/gpg/GpgContext.cpp
index 17347a57..b72eda73 100644
--- a/src/gpg/GpgContext.cpp
+++ b/src/gpg/GpgContext.cpp
@@ -968,6 +968,20 @@ namespace GpgME {
}
}
+ bool GpgContext::addUID(const GpgKey &key, const UID &uid) {
+ QString userid = QString("%1 (%3) <%2>").arg(uid.name, uid.email, uid.comment);
+ auto gpgmeError = gpgme_op_adduid(mCtx, key.key_refer, userid.toUtf8().constData(), 0);
+ if(gpgmeError == GPG_ERR_NO_ERROR) {
+ emit signalKeyUpdated(key.id);
+ return true;
+ }
+ else {
+ checkErr(gpgmeError);
+ return false;
+ }
+
+ }
+
}