aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* qt: Prevent u32 overflow when calculating expiration dateIngo Klöcker2022-06-103-7/+5
| | | | | | | | | | | | | * lang/qt/src/qgpgmesignkeyjob.cpp (sign_key): Change maxAllowedDate to 2106-02-05. Change log-level from warning to debug. * lang/qt/tests/t-various.cpp (TestVarious::testSignKeyWithExpiration): Remove check for warning. Adapt assertion. -- Capping the expiration date at 2106-02-05 prevents a u32 overflow when adding the number of days until the maximal date to the current time. GnuPG-bug-id: 5991
* Revert "tests: Avoid problems with local time across a day boundary."Ingo Klöcker2022-06-091-1/+1
| | | | This reverts commit 5ba0e454a37c9b0d3badddfc2dad8bcc7c7af874.
* tests: Avoid problems with local time across a day boundary.Werner Koch2022-05-231-1/+1
| | | | | | -- GnuPG-bug-id: 5991
* qt: Revert change of result signal of RefreshKeysJobIngo Klöcker2022-05-052-2/+2
| | | | | | | | | | | | * lang/qt/src/refreshkeysjob.h (RefreshKeysJob::result): Remove optional parameters auditLogAsHtml and auditLogError. * lang/qt/tests/run-refreshkeysjob.cpp (main): Update accordingly. -- This reverts f4c35609257156d0e32b8dd7315011b484919f05. The reason for the previous change does no longer apply. GnuPG-bug-id: 5951
* qt: Use lambda instead of std::bindIngo Klöcker2022-05-051-1/+1
| | | | | | | | | * lang/qt/src/qgpgmerefreshopenpgpkeysjob.cpp (QGpgMERefreshOpenPGPKeysJob::start): Replace std::bind call with a lambda. -- GnuPG-bug-id: 5951
* qt: Emit import result when refreshing OpenPGP keysIngo Klöcker2022-05-048-43/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/refreshopenpgpkeysjob.h: New. * lang/qt/src/Makefile.am, lang/qt/src/job.cpp: Update accordingly. * lang/qt/src/qgpgmerefreshopenpgpkeysjob.h (class QGpgMERefreshOpenPGPKeysJob): Derive from RefreshOpenPGPKeysJob with result ImportResult. Remove unused start overload. * lang/qt/src/qgpgmerefreshopenpgpkeysjob.cpp (locate_external_keys): Ignore result of KeyListJob. Return import result. (receive_keys): Return import result. (refresh_keys): Merge the two import results and return the result. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function refreshOpenPGPKeysJob. * lang/qt/src/protocol_p.h (Protocol::refreshKeysJob): Return nullptr for OpenPGP protocol. (Protocol::refreshOpenPGPKeysJob): New. * lang/qt/tests/run-refreshkeysjob.cpp (main): Use appropriate job for the protocol of the key to refresh. -- This adds RefreshOpenPGPKeysJob complementing RefreshKeysJob (for S/MIME keys). Changing the result type of RefreshKeysJob would break the ABI. Therefore we have to introduce a new base class for the refresh job for OpenPGP. We derive this base class from AbstractImportJob because we want to return an import result. GnuPG-bug-id: 5951
* qt: Apply compiler hintIngo Klöcker2022-05-021-1/+1
| | | | | | * lang/qt/tests/t-verify.cpp (VerifyTest::testSignatureKey): Use reference type to prevent copying. --
* qt: Use GpgME::Locate aliasIngo Klöcker2022-05-022-2/+2
| | | | | | | * lang/qt/src/protocol_p.h (Protocol::locateKeysJob): Use Locate alias instead of Extern|Local. * lang/qt/src/qgpgmekeyformailboxjob.cpp (do_work): Ditto. --
* qt: Add job for refreshing OpenPGP keysIngo Klöcker2022-05-025-4/+218
| | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmerefreshopenpgpkeysjob.h, lang/qt/src/qgpgmerefreshopenpgpkeysjob.cpp: New. * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/protocol_p.h (Protocol::refreshKeysJob): Add support for OpenPGP protocol. -- The new job performs a --locate-external-keys for the email addresses of all not revoked user IDs of the given keys, and it performs a --recv-keys for the fingerprints of the given keys. The former may import new keys from WKD or an LDAP server or via some other (hopefully trusted) auto-key-locate mechanism. GnuPG-bug-id: 5951
* qt: Add debug helper for Result classes with output stream operatorIngo Klöcker2022-05-021-0/+9
| | | | | | | * lang/qt/src/util.h (toLogString): New. -- GnuPG-bug-id: 5951
* qt: Factor out helper for getting the fingerprints of some keysIngo Klöcker2022-05-023-6/+23
| | | | | | | | * lang/qt/src/util.h, lang/qt/src/util.cpp (toFingerprints): New. * lang/qt/src/qgpgmerefreshsmimekeysjob.cpp: Use the helper. -- GnuPG-bug-id: 5951
* qt,doc: Fix some API documentationIngo Klöcker2022-05-024-27/+5
| | | | | | | -- Fix or remove API documentation that has been copied and pasted from other jobs.
* qt: Fix connection to readyReadStandardOutput signalIngo Klöcker2022-04-292-10/+6
| | | | | | | | | | | | | | | * lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.cpp (QGpgMERefreshSMIMEKeysJob::slotStderr): Remove. * lang/qt/src/qgpgmerefreshsmimekeysjob.cpp (QGpgMERefreshSMIMEKeysJob::startAProcess): Handle readyReadStandardOutput and readyReadStandardError signals with lambdas. -- For now output stdout and stderr of gpgsm process as debug log. In particular, this "adds" the missing slot slotStdout. GnuPG-bug-id: 5951
* qt: Add test runner for refresh jobIngo Klöcker2022-04-292-1/+140
| | | | | | | | | * lang/qt/tests/run-refreshkeysjob.cpp: New. * lang/qt/tests/Makefile.am (run_refreshkeysjob_SOURCES): New. (noinst_PROGRAMS): Add new build artifact. -- GnuPG-bug-id: 5951
* qt: Make RefreshKeysJob result compatible with standard job resultIngo Klöcker2022-04-291-1/+1
| | | | | | | | | | * lang/qt/src/refreshkeysjob.h (RefreshKeysJob::result): Add optional parameters auditLogAsHtml and auditLogError. -- This is necessary for the OpenPGP-implementation of this job. GnuPG-bug-id: 5951
* qt: Allow refreshing a list of keysIngo Klöcker2022-04-293-7/+38
| | | | | | | | | | | | | | * lang/qt/src/refreshkeysjob.h (class RefreshKeysJob): Add pure virtual member function start taking a list of keys. * lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.cpp (class QGpgMERefreshSMIMEKeysJob): Implement new member function. -- The new overload makes it easier to refresh some keys if one does already have Keys. GnuPG-bug-id: 5951
* qt: Minor refactoringIngo Klöcker2022-04-291-8/+10
| | | | | | | * lang/qt/src/qgpgmerefreshsmimekeysjob.cpp: Use namespace QGpgME. -- GnuPG-bug-id: 5951
* qt: Rename QGpgMERefreshKeysJob to QGpgMERefreshSMIMEKeysJobIngo Klöcker2022-04-294-24/+24
| | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmerefreshkeysjob.h, lang/qt/src/qgpgmerefreshkeysjob.cpp: Change name to * lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.cpp: ... this, and adapt the include guard. (class QGpgMERefreshKeysJob): Rename to QGpgMERefreshSMIMEKeysJob. * lang/qt/src/Makefile.am: Adapt mentioned file names accordingly. * lang/qt/src/protocol_p.h (Protocol::refreshKeysJob): Use renamed class. -- To avoid confusion with a similar job for OpenPGP keys with a completely different implementation, we rename this class to make clear that it is specific for S/MIME keys. GnuPG-bug-id: 5951
* qt: Rely on the bad passphrase error reported by gpgIngo Klöcker2022-04-251-17/+2
| | | | | | | | | | | * lang/qt/src/qgpgmedecryptverifyjob.cpp (patch_decryption_result): Removed. (decrypt_verify): Remove usage of patch_decryption_result. -- This reverts most of revision d8e5871dca9425811873058150677a158235613d. GnuPG-bug-id: 5939
* qt: Report better error if decryption failed because of bad passphraseIngo Klöcker2022-04-221-7/+20
| | | | | | | | | | | | * lang/qt/src/qgpgmedecryptverifyjob.cpp (patch_decryption_result): New. (decrypt_verify): Call patch_decryption_result. -- Replace the generic "decryption failed" error with the more specific "bad passphrase" error if the audit log indicates that a wrong symmetric password caused the decryption to fail. GnuPG-bug-id: 5939
* qt,doc: Fix typo and grammar in API documentationIngo Klöcker2022-04-051-5/+2
| | | | --
* qt: Check arguments passed to the revoke key jobIngo Klöcker2022-03-312-5/+98
| | | | | | | | | | | | | | | | * lang/qt/src/qgpgmerevokekeyjob.cpp (check_arguments): New. (QGpgMERevokeKeyJob::start, QGpgMERevokeKeyJob::exec): Call check_arguments. * lang/qt/tests/t-revokekey.cpp (RevokeKeyJobTest): Add member functions testErrorHandling_nullKey, testErrorHandling_invalidReason, testErrorHandling_invalidDescription. -- Check that the key is not a null key, that the reason has a valid value, and that the description lines do not contain endline characters and are not empty. GnuPG-bug-id: 5904
* qt,tests: Verify reason code and description of revocationIngo Klöcker2022-03-301-0/+66
| | | | | | | | | | | | | | | * lang/qt/tests/t-revokekey.cpp (RevokeKeyJobTest::testRevokeKeyAsync, RevokeKeyJobTest::testRevokeKeySync_noReasonDescription, RevokeKeyJobTest::testRevokeKeySync_oneLineReasonDescription, RevokeKeyJobTest::testRevokeKeySync_twoLinesReasonDescription): Call verifyReason. (class RevokeKeyJobTest): Add private member function verifyReason. -- gpgme doesn't parse the information, so we run gpg manually to verify the revocation reason and the description. GnuPG-bug-id: 5904
* qt: Add job to revoke own OpenPGP keysIngo Klöcker2022-03-309-4/+492
| | | | | | | | | | | | | | | | | | | | * lang/qt/src/revokekeyjob.h, lang/qt/src/qgpgmerevokekeyjob.h, lang/qt/src/qgpgmerevokekeyjob.cpp: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function revokeKeyJob. * lang/qt/src/protocol_p.h (Protocol::revokeKeyJob): New. * lang/qt/src/job.cpp, lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/Makefile.am (the_tests, moc_files, noinst_PROGRAMS): Add new test. (t_revokekey_SOURCES): New. * lang/qt/tests/t-revokekey.cpp: New. -- The new job allows revoking own OpenPGP keys as with the "revkey" edit-key command of gpg. GnuPG-bug-id: 5904
* qt: Add missing include of config.hIngo Klöcker2022-03-071-0/+4
| | | | | | | * lang/qt/src/util.cpp: Include config.h. -- GnuPG-bug-id: 5871
* qt,doc: Remove comments about throwing exceptionsIngo Klöcker2022-03-077-17/+0
| | | | | | -- The jobs do not throw GpgME::Exception anymore since a long time.
* qt: Fix ABI compatibility with 1.16.0Ingo Klöcker2022-02-171-6/+7
| | | | | | | | | | | * lang/qt/src/protocol.h (class Protocol): Move new virtual methods to the end of the class. -- This makes the vtable offsets of the old virtual methods match those in 1.16.0 again. GnuPG-bug-id: 5834
* qt: Fix build for older Qt versions.Werner Koch2022-02-071-0/+1
| | | | * lang/qt/src/util.cpp: Include <functional>.
* qt: Add job to import keys given by key idsIngo Klöcker2022-02-039-1/+316
| | | | | | | | | | | | | | | | | | * lang/qt/src/receivekeysjob.h, lang/qt/src/qgpgmereceivekeysjob.h, lang/qt/src/qgpgmereceivekeysjob.cpp: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function receiveKeysJob. * lang/qt/src/protocol_p.h (Protocol::receiveKeysJob): Implement it. * lang/qt/src/job.cpp, lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-receivekeysjob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- This job allows importing keys that are given by their key ids (or fingerprints) from keyservers as with gpg's recv-keys command. GnuPG-bug-id: 5808
* qt: Add helper for converting QStringList to vector of stringsIngo Klöcker2022-02-033-2/+101
| | | | | | | | | | | | | * lang/qt/src/util.h, lang/qt/src/util.cpp: New. * lang/qt/src/Makefile.am (qgpgme_sources, private_qgpgme_headers): Add new files. -- Additionally to the internal helper function toStrings(), this adds a copy of the internal make_error helper of GpgME++ which is used in a few places by QGpgME. We use the same error source id as GpgME++. GnuPG-bug-id: 5808
* qt: Remove superfluous includeIngo Klöcker2022-01-171-2/+0
| | | | | | | | * lang/qt/src/importjob.h: Remove include of QByteArray. -- QByteArray is included by other headers already. Besides: Qt headers shouldn't be included with the package/module prefixes.
* qt: Fix build without installed GpgME++ headersIngo Klöcker2022-01-176-10/+18
| | | | | | | | | * lang/qt/src/importjob.h, lang/qt/src/wkdlookupresult.h: Include headers of GpgME++ without "gpgme++/" prefix when building QGpgme. * lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmewkdlookupjob.cpp, lang/qt/src/wkdlookupresult.cpp, lang/qt/tests/t-import.cpp: Include headers of GpgME++ without "gpgme++/" prefix. --
* qt: Add job to add existing subkeys to other keysIngo Klöcker2022-01-1311-8/+598
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/addexistingsubkeyjob.h, lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp, lang/qt/src/qgpgmeaddexistingsubkeyjob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function addExistingSubkeyJob. * lang/qt/src/protocol_p.h (Protocol::addExistingSubkeyJob): Implement. * lang/qt/src/job.cpp, lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/Makefile.am (the_tests, moc_files, noinst_PROGRAMS): Add new test. (t_addexistingsubkey_SOURCES): New. * lang/qt/tests/t-addexistingsubkey.cpp: New. * lang/qt/tests/t-support.h (VERIFY_OR_RETURN_VALUE, COMPARE_OR_RETURN_VALUE, VERIFY_OR_OBJECT, COMPARE_OR_OBJECT, VERIFY_OR_FALSE, COMPARE_OR_FALSE): New. * lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp (class QQGpgMETest): New member function importSecretKeys. -- The new job allows adding existing subkeys to other keys as with the "addkey" edit-key command of gpg. The added subkey will have the same expiration date (+/- 1 second) as the original subkey. GnuPG-bug-id: 5770
* qt,tests: Add helper to hook up the test passphrase providerIngo Klöcker2022-01-138-179/+69
| | | | | | | | | | | | | | | * lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp (class QGpgMETest): Add member function hookUpPassphraseProvider. Add member mPassphraseProvider. * lang/qt/tests/t-changeexpiryjob.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-remarks.cpp, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-trustsignatures.cpp, lang/qt/tests/t-various.cpp: Use new helper. -- GnuPG-bug-id: 5770
* qt,tests: Add asyncDone signal to base class of all testsIngo Klöcker2022-01-1313-35/+4
| | | | | | | | | | | | | | | | | | | | | | | * lang/qt/tests/t-support.h (class QGpgMETest): Add signal asyncDone. * lang/qt/tests/t-changeexpiryjob.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-import.cpp, lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-remarks.cpp, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-trustsignatures.cpp, lang/qt/tests/t-various.cpp, lang/qt/tests/t-wkdlookup.cpp, lang/qt/tests/t-wkspublish.cpp: Remove signal asyncDone from the test classes. -- This reduces duplication and makes it possible to use the signal in the base class. GnuPG-bug-id: 5770
* qt: Add factory function for secret subkey export jobIngo Klöcker2022-01-043-1/+19
| | | | | | | | | | | | | | * lang/qt/src/protocol.h (class Protocol): Add member function secretSubkeyExportJob. * lang/qt/src/protocol_p.h (Protocol::secretSubkeyExportJob): Implement. * lang/qt/tests/run-exportjob.cpp (showUsageAndExitWithCode): Print new option. (createExportJob): Create secret subkey export job if requested. (main): New option --secret-subkey. -- GnuPG-bug-id: 5757
* qt: Remove obsolete QGpgMESecretKeyExportJobIngo Klöcker2022-01-043-232/+1
| | | | | | | | | | | | | * lang/qt/src/Makefile.am: Remove all occurrences of qgpgmesecretkeyexportjob.*. * lang/qt/src/qgpgmesecretkeyexportjob.cpp, lang/qt/src/qgpgmesecretkeyexportjob.h: Remove. -- QGpgMESecretKeyExportJob is an internal class, so that we can safely remove it. GnuPG-bug-id: 5757
* qt: Use QGpgMEExportJob also for export of secret keysIngo Klöcker2022-01-046-19/+152
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/protocol.h (Protocol::secretKeyExportJob): Document charset argument as ignored. * lang/qt/src/protocol_p.h (Protocol::secretKeyExportJob): Use QGpgMEExportJob instead of QGpgMESecretKeyExportJob. * lang/qt/src/qgpgmeexportjob.h (class QGpgMEExportJob): Add c'tor taking an export mode. Add member m_exportMode. Rename member m_flags to m_additionalExportModeFlags. (QGpgMEExportJob::~QGpgMEExportJob): Mark as override. * lang/qt/src/qgpgmeexportjob.cpp (QGpgMEExportJob::QGpgMEExportJob): Delegate to new c'tor. Implement new c'tor. (QGpgMEExportJob::~QGpgMEExportJob): Use default. (export_qba): Rename argument flags to mode. (QGpgMEExportJob::start): Pass combination of export mode and additional mode flags to export_qba. (QGpgMEExportJob::setExportFlags): Adapt to renaming of member. * lang/qt/tests/run-exportjob.cpp: New. -- This change makes it possible to export secret OpenPGP keys. GnuPG-bug-id: 5757
* qt: Detect an import error caused by a wrong passwordIngo Klöcker2021-12-221-1/+17
| | | | | | | | | | | | | * lang/qt/src/qgpgmeimportjob.cpp (import_qba): Check import statuses of import result for bad passphrase errors. -- To allow users of the import job to handle a failed import caused by a wrong password more gracefully, check if all import statuses of the import result have a bad passphrase error and return a bad passphrase error as import result in this case. GnuPG-bug-id: 5713
* qt,tests: Add test runner for testing the import jobIngo Klöcker2021-12-222-1/+101
| | | | | | | | | * lang/qt/tests/Makefile.am (run_importjob_SOURCES): New. (noinst_PROGRAMS): Add run-importjob. * lang/qt/tests/run-importjob.cpp: New. -- GnuPG-bug-id: 5713
* qt: Allow specifying an import filter when importing keysIngo Klöcker2021-12-154-8/+79
| | | | | | | | | | | | | | | * lang/qt/src/importjob.cpp (struct ImportJobPrivate): Add member m_importFilter. * lang/qt/src/importjob.cpp, lang/qt/src/importjob.h (class ImportJob): Add member functions setImportFilter and importFilter. * lang/qt/src/qgpgmeimportjob.cpp (import_qba): Add arg importFilter and adjust the callers. Set import filter context flag. * lang/qt/tests/t-import.cpp (ImportTest): Add member function testImportWithImportFilter. -- GnuPG-bug-id: 5739
* qt: Avoid test failure when test is run multiple timesIngo Klöcker2021-12-151-16/+26
| | | | | | | | | | | | * lang/qt/tests/t-import.cpp (ImportTest): Add member tempGpgHome and member function initTestCase. (keyFpr, keyData): Move to ImportTest::testImportWithKeyOrigin. -- Use different temporary GNUPGHOME's when running the test. This ensures that the import in the test is always done with a new keyring. GnuPG-bug-id: 5733
* qt: Fix erroneous reuse of JobPrivate objectsIngo Klöcker2021-12-151-0/+1
| | | | | | | | | | | | * lang/qt/src/job.cpp (Job::~Job): Destroy JobPrivate object belonging to destroyed job. -- In some tests different Job objects reused the same JobPrivate object because they were created with the same memory address. Obviously, this shouldn't happen. GnuPG-bug-id: 5739
* qt: Add pattern used for WKD lookup to resultIngo Klöcker2021-12-144-12/+23
| | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmewkdlookupjob.cpp (run_wkd_get): Change type of arg email. (lookup_keys): Add pattern to result. * lang/qt/src/wkdlookupresult.h (class WKDLookupResult): Add arg pattern to c'tors. Add member function pattern. * lang/qt/src/wkdlookupresult.cpp (class WKDLookupResult::Private): Add field pattern. (WKDLookupResult::WKDLookupResult): Pass pattern to pimpl. (WKDLookupResult::pattern): New. * lang/qt/tests/t-wkdlookup.cpp (testWKDLookupAsync, testWKDLookupSync, testLookupWithNoResultAsync): Check pattern. -- GnuPG-bug-id: 5728
* qt: Allow setting key origin when importing keysIngo Klöcker2021-12-146-9/+229
| | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (qgpgme_sources): Add importjob.cpp. * lang/qt/src/importjob.cpp: New. * lang/qt/src/importjob.h (class ImportJob): Add member functions setKeyOrigin, keyOrigin, keyOriginUrl. * lang/qt/src/qgpgmeimportjob.cpp (originToString): New. (import_qba): Set key origin context flag. (QGpgMEImportJob::start, QGpgMEImportJob::exec): Add options to call of import_qba. * lang/qt/tests/Makefile.am (the_tests, moc_files, noinst_PROGRAMS): Add new test. (t_import_SOURCES): New. * lang/qt/tests/t-import.cpp: New. -- GnuPG-bug-id: 5733
* qt,tests: Skip WKD lookup tests by defaultIngo Klöcker2021-12-143-2/+17
| | | | | | | | | | | * lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.h (class QGpgMETest): Add member function doOnlineTests. * lang/qt/tests/t-wkdlookup.cpp (testWKDLookupAsync, testWKDLookupSync, testLookupWithNoResultAsync): Skip tests if online tests are not enabled. -- GnuPG-bug-id: 5728
* qt: Support WKD lookup without implicit importIngo Klöcker2021-12-1313-8/+727
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (qgpgme_sources): Add qgpgmewkdlookupjob.cpp, wkdlookupresult.cpp. (qgpgme_headers): Add wkdlookupjob.h, wkdlookupresult.h. (camelcase_headers): Add WKDLookupJob, WKDLookupResult. (private_qgpgme_headers): Add qgpgmewkdlookupjob.h. (qgpgme_moc_sources): Add qgpgmewkdlookupjob.moc, wkdlookupjob.moc. * lang/qt/src/job.cpp: Define c'tor and d'tor of WKDLookupJob. * lang/qt/src/protocol.h (Protocol::wkdLookupJob): New. * lang/qt/src/protocol_p.h (Protocol::wkdLookupJob): New. * lang/qt/src/qgpgmewkdlookupjob.cpp, lang/qt/src/qgpgmewkdlookupjob.h, lang/qt/src/wkdlookupjob.h, lang/qt/src/wkdlookupresult.cpp, lang/qt/src/wkdlookupresult.h: New. * lang/qt/tests/Makefile.am (EXTRA_DIST): Add final.test. (the_tests): New. (TESTS): Remove all t-*. Add $(the_tests) and final.test. (moc_files): Add t-wkdlookup.moc. (t_wkdlookup_SOURCES): New. (noinst_PROGRAMS): Add t-wkdlookup. * lang/qt/tests/final.test: New. * lang/qt/tests/t-support.h (QTest::toString): New template specialization for std::string. * lang/qt/tests/t-wkdlookup.cpp: New. -- The new WKDLookupJob allows running a WKD lookup without implicit import of the retrieved key. This makes it possible to do WKD lookups similar to keyserver lookups (aka external keylistings). The new final.test pseudo test stops a dirmngr that may have been started by the tests. The toString() template specialization enables printing of the actual and expected values in case of failed QCOMPARE. GnuPG-bug-id: 5728
* qt: Fix example for using the asynchronous job APIIngo Klöcker2021-12-131-0/+1
| | | | | * lang/qt/src/protocol.h (class Protocol): Fix API documentation. --
* qt: Fix build against Qt 5.9Ingo Klöcker2021-09-132-3/+3
| | | | | | | | | | | | | * lang/qt/tests/t-keylist.cpp (KeyListTest::testListAllKeysSync): Ensure same type for both arguments of QCOMPARE. * lang/qt/tests/t-various.cpp (TestVarious::testSetExpire): Ensure same type for both arguments of QCOMPARE. -- Qt 5.9 does not yet have the generic qCompare helper which supports arguments of any type that can be compared with ==. GnuPG-bug-id: 5592
* qt: Expect UTF-8 on stderr on WindowsAndre Heinecke2021-08-271-44/+1
| | | | | | | | | | * lang/qt/src/threadedjobmixin.cpp (stringFromGpgOutput): Expect UTF-8. -- In recent versions more and more output was changed to be UTF-8 on Windows. Werner advised to always expect UTF-8 diagnostics.