aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/GpgContext.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-26 14:53:51 +0000
committerSaturneric <[email protected]>2021-05-26 14:53:51 +0000
commit0739199b9e5a5bb0dc95efd309cc209a16ccea18 (patch)
tree1b9d87c3b4b57d3afef6353d2e2b79ccbf4fa3af /src/gpg/GpgContext.cpp
parentRemove the self-compiled GpgME package (diff)
downloadGpgFrontend-0739199b9e5a5bb0dc95efd309cc209a16ccea18.tar.gz
GpgFrontend-0739199b9e5a5bb0dc95efd309cc209a16ccea18.zip
Fix the error and adjust the way the pop-up window pops up after the key is generated.
Diffstat (limited to '')
-rw-r--r--src/gpg/GpgContext.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpg/GpgContext.cpp b/src/gpg/GpgContext.cpp
index e665fdea..c73d3d65 100644
--- a/src/gpg/GpgContext.cpp
+++ b/src/gpg/GpgContext.cpp
@@ -263,12 +263,16 @@ namespace GpgME {
gpgme_key_t key;
+ qDebug() << "Clear List and Map";
+
mKeyList.clear();
mKeyMap.clear();
auto &keys = mKeyList;
auto &keys_map = mKeyMap;
+ qDebug() << "Set Keylist Mode";
+
gpgmeError = gpgme_set_keylist_mode(mCtx,
GPGME_KEYLIST_MODE_LOCAL
| GPGME_KEYLIST_MODE_WITH_SECRET
@@ -280,16 +284,22 @@ namespace GpgME {
return;
}
+ qDebug() << "Operate KeyList Start";
+
gpgmeError = gpgme_op_keylist_start(mCtx, nullptr, 0);
if (gpg_err_code(gpgmeError) != GPG_ERR_NO_ERROR) {
checkErr(gpgmeError);
return;
}
+ qDebug() << "Start Loop";
+
while ((gpgmeError = gpgme_op_keylist_next(mCtx, &key)) == GPG_ERR_NO_ERROR) {
if (!key->subkeys)
continue;
+ qDebug() << "Append Key" << key->subkeys->keyid;
+
keys.append(GpgKey(key));
keys_map.insert(keys.back().id, &keys.back());
gpgme_key_unref(key);
@@ -301,6 +311,8 @@ namespace GpgME {
return;
}
+ qDebug() << "Operate KeyList End";
+
gpgmeError = gpgme_op_keylist_end(mCtx);
if (gpg_err_code(gpgmeError) != GPG_ERR_NO_ERROR) {
checkErr(gpgmeError);