diff options
author | saturneric <[email protected]> | 2024-12-13 15:22:33 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-13 15:22:33 +0000 |
commit | f7a00c58d2824f49ecaafc0152fc0b8213772e46 (patch) | |
tree | d012e5fac4ff9f48cd10381a0b79de0294d28d18 /src/core/model/GpgSubKey.cpp | |
parent | doc: update SECURITY.md (diff) | |
download | GpgFrontend-f7a00c58d2824f49ecaafc0152fc0b8213772e46.tar.gz GpgFrontend-f7a00c58d2824f49ecaafc0152fc0b8213772e46.zip |
refactor: using qt containers instead of std containers
Diffstat (limited to 'src/core/model/GpgSubKey.cpp')
-rw-r--r-- | src/core/model/GpgSubKey.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/model/GpgSubKey.cpp b/src/core/model/GpgSubKey.cpp index ba2f749c..eba4167e 100644 --- a/src/core/model/GpgSubKey.cpp +++ b/src/core/model/GpgSubKey.cpp @@ -31,17 +31,11 @@ namespace GpgFrontend { GpgSubKey::GpgSubKey() = default; -GpgSubKey::GpgSubKey(gpgme_subkey_t subkey) - : subkey_ref_(subkey, [&](gpgme_subkey_t subkey) {}) {} +GpgSubKey::GpgSubKey(gpgme_subkey_t subkey) : subkey_ref_(subkey) {} -GpgSubKey::GpgSubKey(GpgSubKey&& o) noexcept { - swap(subkey_ref_, o.subkey_ref_); -} +GpgSubKey::GpgSubKey(const GpgSubKey&) = default; -auto GpgSubKey::operator=(GpgSubKey&& o) noexcept -> GpgSubKey& { - swap(subkey_ref_, o.subkey_ref_); - return *this; -}; +auto GpgSubKey::operator=(const GpgSubKey&) -> GpgSubKey& = default; auto GpgSubKey::operator==(const GpgSubKey& o) const -> bool { return GetFingerprint() == o.GetFingerprint(); @@ -56,7 +50,7 @@ auto GpgSubKey::GetPubkeyAlgo() const -> QString { } auto GpgSubKey::GetKeyAlgo() const -> QString { - auto* buffer = gpgme_pubkey_algo_string(subkey_ref_.get()); + auto* buffer = gpgme_pubkey_algo_string(subkey_ref_); auto algo = QString(buffer); gpgme_free(buffer); return algo.toUpper(); |