diff options
author | Ingo Klöcker <[email protected]> | 2022-08-04 10:06:15 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2022-08-04 10:06:15 +0000 |
commit | c3b183831db5a2a490ba49bf4804730679eb59d0 (patch) | |
tree | 151bdcc0accbd1de496a2ce893f8d85dd0dd79e2 /lang/qt/tests/run-refreshkeysjob.cpp | |
parent | build: Update config.guess and config.sub. (diff) | |
download | gpgme-c3b183831db5a2a490ba49bf4804730679eb59d0.tar.gz gpgme-c3b183831db5a2a490ba49bf4804730679eb59d0.zip |
qt: Remove job for refreshing OpenPGP keys
* lang/qt/src/qgpgmerefreshopenpgpkeysjob.cpp,
lang/qt/src/qgpgmerefreshopenpgpkeysjob.h,
lang/qt/src/refreshopenpgpkeysjob.h: Remove.
* lang/qt/src/Makefile.am, lang/qt/src/job.cpp: Update accordingly.
* lang/qt/src/protocol.h (class Protocol): Remove pure virtual member
function refreshOpenPGPKeysJob.
* lang/qt/src/protocol_p.h (Protocol::refreshOpenPGPKeysJob): Remove.
* lang/qt/tests/run-refreshkeysjob.cpp (main): Use ReceiveKeysJob for
OpenPGP keys.
--
The RefreshOpenPGPKeysJob did more than it was intended to do, e.g. it
imported new keys with the email addresses of the key to be refreshed
via the configured auto-key-locate methods, but only a refresh from the
key servers is wanted. For this we can use the ReceiveKeysJob.
This commit mostly reverts the commits
e12861f18c6b431b40bfa78eb6f1d149690a5fcd
c64a8daf507a2216611861a12f312466b0bae8b2
The changes are source- and binary-compatible to the last release.
GnuPG-bug-id: 5951
Diffstat (limited to '')
-rw-r--r-- | lang/qt/tests/run-refreshkeysjob.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lang/qt/tests/run-refreshkeysjob.cpp b/lang/qt/tests/run-refreshkeysjob.cpp index aa9a6d62..940c0c77 100644 --- a/lang/qt/tests/run-refreshkeysjob.cpp +++ b/lang/qt/tests/run-refreshkeysjob.cpp @@ -36,7 +36,7 @@ #include <protocol.h> #include <refreshkeysjob.h> -#include <refreshopenpgpkeysjob.h> +#include <receivekeysjob.h> #include <QCoreApplication> #include <QDebug> @@ -120,16 +120,16 @@ int main(int argc, char **argv) std::cout << "Refreshing " << displayName(key.protocol()) << " key " << key.userID(0).id() << std::endl; if (key.protocol() == GpgME::OpenPGP) { - auto job = QGpgME::openpgp()->refreshOpenPGPKeysJob(); + auto job = QGpgME::openpgp()->receiveKeysJob(); if (!job) { std::cerr << "Error: Could not create job to refresh OpenPGP key" << std::endl; return 1; } - QObject::connect(job, &QGpgME::RefreshOpenPGPKeysJob::result, &app, [](const GpgME::ImportResult &result, const QString &, const GpgME::Error &) { + QObject::connect(job, &QGpgME::ReceiveKeysJob::result, &app, [](const GpgME::ImportResult &result, const QString &, const GpgME::Error &) { std::cout << "Result: " << result << std::endl; qApp->quit(); }); - const auto err = job->start({key}); + const auto err = job->start({QString::fromLatin1(key.primaryFingerprint())}); if (err) { std::cerr << "Error: " << err.asString() << std::endl; return 1; |