summaryrefslogtreecommitdiffstats
path: root/source/kde/kde/patch/kleopatra/a3684049dd4f0d2d47dcc6605ff31ce753254ef9.patch
blob: eb5f52460328a454ae00af99486eb17a41184f56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From a3684049dd4f0d2d47dcc6605ff31ce753254ef9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
Date: Fri, 19 Aug 2022 13:43:41 +0200
Subject: [PATCH] Use ReceiveKeysJob for refreshing OpenPGP keys

This refreshes the OpenPGP key from the configured key server.

GnuPG-bug-id: 5903

CHANGELOG: Fix building against QGpgME 1.18.0
BUG: 458044
FIXED-IN: 22.08.1

(cherry picked from commit 87d8b00d4b2286489d5fadc9cfa07f1d721cdfe3)
---
 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 <QGpgME/Protocol>
 #ifdef QGPGME_SUPPORTS_KEY_REFRESH
 #include <QGpgME/RefreshKeysJob>
-#include <QGpgME/RefreshOpenPGPKeysJob>
+#include <QGpgME/ReceiveKeysJob>
 #endif
 
 #include <gpgme++/importresult.h>
@@ -44,7 +44,7 @@ public:
     void cancel();
 
 #ifdef QGPGME_SUPPORTS_KEY_REFRESH
-    std::unique_ptr<QGpgME::RefreshOpenPGPKeysJob> startOpenPGPJob();
+    std::unique_ptr<QGpgME::ReceiveKeysJob> startOpenPGPJob();
     std::unique_ptr<QGpgME::RefreshKeysJob> startSMIMEJob();
 #endif
     void onOpenPGPJobResult(const ImportResult &result);
@@ -136,19 +136,19 @@ void RefreshCertificateCommand::Private::cancel()
 }
 
 #ifdef QGPGME_SUPPORTS_KEY_REFRESH
-std::unique_ptr<QGpgME::RefreshOpenPGPKeysJob> RefreshCertificateCommand::Private::startOpenPGPJob()
+std::unique_ptr<QGpgME::ReceiveKeysJob> RefreshCertificateCommand::Private::startOpenPGPJob()
 {
-    std::unique_ptr<QGpgME::RefreshOpenPGPKeysJob> refreshJob{QGpgME::openpgp()->refreshOpenPGPKeysJob()};
+    std::unique_ptr<QGpgME::ReceiveKeysJob> 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