From 87d8b00d4b2286489d5fadc9cfa07f1d721cdfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 4 Aug 2022 12:24:25 +0200 Subject: [PATCH] Use ReceiveKeysJob for refreshing OpenPGP keys This refreshes the OpenPGP key from the configured key server. GnuPG-bug-id: 5903 --- src/commands/refreshcertificatecommand.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands/refreshcertificatecommand.cpp b/src/commands/refreshcertificatecommand.cpp index 226d791f..6a88bbf4 100644 --- a/src/commands/refreshcertificatecommand.cpp +++ b/src/commands/refreshcertificatecommand.cpp @@ -19,7 +19,7 @@ #include #ifdef QGPGME_SUPPORTS_KEY_REFRESH #include -#include +#include #endif #include @@ -44,7 +44,7 @@ public: void cancel(); #ifdef QGPGME_SUPPORTS_KEY_REFRESH - std::unique_ptr startOpenPGPJob(); + std::unique_ptr startOpenPGPJob(); std::unique_ptr startSMIMEJob(); #endif void onOpenPGPJobResult(const ImportResult &result); @@ -136,19 +136,19 @@ void RefreshCertificateCommand::Private::cancel() } #ifdef QGPGME_SUPPORTS_KEY_REFRESH -std::unique_ptr RefreshCertificateCommand::Private::startOpenPGPJob() +std::unique_ptr RefreshCertificateCommand::Private::startOpenPGPJob() { - std::unique_ptr refreshJob{QGpgME::openpgp()->refreshOpenPGPKeysJob()}; + std::unique_ptr refreshJob{QGpgME::openpgp()->receiveKeysJob()}; Q_ASSERT(refreshJob); - connect(refreshJob.get(), &QGpgME::RefreshOpenPGPKeysJob::result, + connect(refreshJob.get(), &QGpgME::ReceiveKeysJob::result, q, [this](const GpgME::ImportResult &result) { onOpenPGPJobResult(result); }); connect(refreshJob.get(), &QGpgME::Job::progress, q, &Command::progress); - const GpgME::Error err = refreshJob->start({key}); + const GpgME::Error err = refreshJob->start({QString::fromLatin1(key.primaryFingerprint())}); if (err) { showError(err); return {}; -- GitLab