diff options
Diffstat (limited to 'src/ui/dialog/controller/SmartCardControllerDialog.cpp')
-rw-r--r-- | src/ui/dialog/controller/SmartCardControllerDialog.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ui/dialog/controller/SmartCardControllerDialog.cpp b/src/ui/dialog/controller/SmartCardControllerDialog.cpp index 797fe052..ba142305 100644 --- a/src/ui/dialog/controller/SmartCardControllerDialog.cpp +++ b/src/ui/dialog/controller/SmartCardControllerDialog.cpp @@ -112,9 +112,8 @@ SmartCardControllerDialog::SmartCardControllerDialog(QWidget* parent) connect(ui_->restartGpgAgentButton, &QPushButton::clicked, this, [=](bool) { bool ret = true; - const auto size = GpgContext::GetAllChannelId().size(); - for (auto i = 0; i < size; i++) { - ret = GpgAdvancedOperator::GetInstance().RestartGpgComponents(); + for (const auto& channel : GpgContext::GetAllChannelId()) { + ret = GpgAdvancedOperator::GetInstance(channel).RestartGpgComponents(); if (!ret) break; } |