diff options
author | Saturneric <[email protected]> | 2021-05-26 16:54:30 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-05-26 16:54:30 +0000 |
commit | f134e08858a14ed4b0284802c968a48bcfbeb6ef (patch) | |
tree | 4670bcc2ef5191559e9adb0e12e95cb4c3cee77d /src/gpg/GpgKey.cpp | |
parent | Fix the error and adjust the way the pop-up window pops up after the key is g... (diff) | |
download | GpgFrontend-f134e08858a14ed4b0284802c968a48bcfbeb6ef.tar.gz GpgFrontend-f134e08858a14ed4b0284802c968a48bcfbeb6ef.zip |
Improve the key information update mechanism
Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to 'src/gpg/GpgKey.cpp')
-rw-r--r-- | src/gpg/GpgKey.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gpg/GpgKey.cpp b/src/gpg/GpgKey.cpp index 99972eee..bcacc8c3 100644 --- a/src/gpg/GpgKey.cpp +++ b/src/gpg/GpgKey.cpp @@ -28,8 +28,6 @@ void GpgKey::parse(gpgme_key_t key) { if(key == nullptr) return; - - good = true; key_refer = key; gpgme_key_ref(key_refer); @@ -257,3 +255,12 @@ GpgKey::~GpgKey() { GpgKey::GpgKey(gpgme_key_t key) { parse(key); } + +void GpgKey::swapKeyRefer(gpgme_key_t key) { + + if(key == nullptr) return; + + gpgme_key_unref(key_refer); + key_refer = nullptr; + parse(key); +} |