diff options
author | saturneric <[email protected]> | 2025-01-27 18:59:29 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-01-27 18:59:29 +0000 |
commit | fb2e47db7b8cd5ca7aac9c0ee1ca8b58ada0158f (patch) | |
tree | 6ea9a200bdc9dfe4dfe5b0e97c841d99e303ee66 /src/core/utils/GpgUtils.cpp | |
parent | feat: upgrade gnupg info gathering module to v1.2.1 (diff) | |
download | GpgFrontend-fb2e47db7b8cd5ca7aac9c0ee1ca8b58ada0158f.tar.gz GpgFrontend-fb2e47db7b8cd5ca7aac9c0ee1ca8b58ada0158f.zip |
refactor: reduce code duplication
Diffstat (limited to 'src/core/utils/GpgUtils.cpp')
-rw-r--r-- | src/core/utils/GpgUtils.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/utils/GpgUtils.cpp b/src/core/utils/GpgUtils.cpp index bfbee963..ec0f35e2 100644 --- a/src/core/utils/GpgUtils.cpp +++ b/src/core/utils/GpgUtils.cpp @@ -29,6 +29,7 @@ #include "GpgUtils.h" #include "core/function/GlobalSettingStation.h" +#include "core/model/GpgKey.h" #include "core/model/KeyDatabaseInfo.h" #include "core/model/SettingsObject.h" #include "core/module/ModuleManager.h" @@ -324,4 +325,12 @@ auto GetKeyDatabaseInfoBySettings() -> QList<KeyDatabaseInfo> { return key_db_infos; } + +auto GPGFRONTEND_CORE_EXPORT Convert2RawGpgMEKeyList( + const QContainer<GpgKey>& keys) -> QContainer<gpgme_key_t> { + QContainer<gpgme_key_t> recipients(keys.begin(), keys.end()); + recipients.emplace_back(nullptr); + + return recipients; +} } // namespace GpgFrontend |