diff options
Diffstat (limited to 'src/ui/main_window/KeyMgmt.cpp')
-rw-r--r-- | src/ui/main_window/KeyMgmt.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ui/main_window/KeyMgmt.cpp b/src/ui/main_window/KeyMgmt.cpp index 150017a1..d6530c64 100644 --- a/src/ui/main_window/KeyMgmt.cpp +++ b/src/ui/main_window/KeyMgmt.cpp @@ -413,9 +413,8 @@ void KeyMgmt::SlotExportKeyToClipboard() { auto keys = GpgKeyGetter::GetInstance(key_list_->GetCurrentGpgContextChannel()) .GetKeys(keys_checked); - for (const auto& key : *keys) { - assert(key.IsGood()); - } + assert(std::all_of(keys->begin(), keys->end(), + [](const auto& key) { return key.IsGood(); })); CommonUtils::WaitForOpera( this, tr("Exporting"), [=](const OperaWaitingHd& op_hd) { @@ -504,9 +503,8 @@ void KeyMgmt::SlotExportAsOpenSSHFormat() { auto keys = GpgKeyGetter::GetInstance(key_list_->GetCurrentGpgContextChannel()) .GetKeys(keys_checked); - for (const auto& key : *keys) { - assert(key.IsGood()); - } + assert(std::all_of(keys->begin(), keys->end(), + [](const auto& key) { return key.IsGood(); })); CommonUtils::WaitForOpera( this, tr("Exporting"), [this, keys](const OperaWaitingHd& op_hd) { |