aboutsummaryrefslogtreecommitdiffstats
path: root/include/gpg/GpgKey.h
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 /include/gpg/GpgKey.h
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 'include/gpg/GpgKey.h')
-rw-r--r--include/gpg/GpgKey.h20
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);
};