diff options
author | Saturneric <[email protected]> | 2021-05-22 15:58:59 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-05-22 15:58:59 +0000 |
commit | d9121e76c7eeb63b23a6a772d38e61b60abfe93d (patch) | |
tree | 965f9f27bba242a584b73ef4947ce54fa652390f /include/gpg/GpgKey.h | |
parent | Expand and improve GpgKey; (diff) | |
download | GpgFrontend-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 'include/gpg/GpgKey.h')
-rw-r--r-- | include/gpg/GpgKey.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/include/gpg/GpgKey.h b/include/gpg/GpgKey.h index 5d244510..835954f9 100644 --- a/include/gpg/GpgKey.h +++ b/include/gpg/GpgKey.h @@ -43,7 +43,7 @@ public: QDateTime expires; QDateTime create_time; - unsigned int length; + unsigned int length{}; bool can_encrypt{}; bool can_sign{}; @@ -62,13 +62,19 @@ public: QVector<UID> uids; - explicit GpgKey(gpgme_key_t key) { - parse(key); - } + gpgme_key_t key_refer = nullptr; - GpgKey() { - is_private_key = false; - } + explicit GpgKey(gpgme_key_t key = nullptr); + + GpgKey(const GpgKey &k); + + GpgKey(GpgKey &&k) noexcept; + + GpgKey& operator=(const GpgKey &k); + + GpgKey& operator=(GpgKey &&k) noexcept; + + ~GpgKey(); void parse(gpgme_key_t key); }; |