aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/model/GpgKey.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-01-03 20:24:01 +0000
committerSaturneric <[email protected]>2022-01-03 20:24:01 +0000
commit5cc72a35de7128ed586830eb90f705fc3ee3cbbf (patch)
tree845bf1472f1da1dbea8efe7d0b977cfcbb493e01 /src/gpg/model/GpgKey.h
parent<fix, feature>(core, ui): add key in smart card support. (diff)
downloadGpgFrontend-5cc72a35de7128ed586830eb90f705fc3ee3cbbf.tar.gz
GpgFrontend-5cc72a35de7128ed586830eb90f705fc3ee3cbbf.zip
<fix, feature>(core, ui): key package import.
1. use gpgme_op_export_keys as multiply keys export. 2. improve ui. 3. write key package import done.
Diffstat (limited to '')
-rw-r--r--src/gpg/model/GpgKey.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpg/model/GpgKey.h b/src/gpg/model/GpgKey.h
index 3336f39e..0ce83372 100644
--- a/src/gpg/model/GpgKey.h
+++ b/src/gpg/model/GpgKey.h
@@ -110,10 +110,9 @@ class GpgKey {
[[nodiscard]] bool HasCardKey() const {
auto subkeys = subKeys();
- return std::any_of(subkeys->begin(), subkeys->end(),
- [](const GpgSubKey& subkey) -> bool {
- if (subkey.is_cardkey()) return true;
- });
+ return std::any_of(
+ subkeys->begin(), subkeys->end(),
+ [](const GpgSubKey& subkey) -> bool { return subkey.is_cardkey(); });
}
[[nodiscard]] bool is_private_key() const { return _key_ref->secret; }