aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* qt: Add job for creating signed archivesikloecker/t6342-gpgtarIngo Klöcker2023-01-308-0/+439
| | | | | | | | | | | | | | | | | | * lang/qt/src/signarchivejob.cpp, lang/qt/src/signarchivejob.h, lang/qt/src/signarchivejob_p.h, lang/qt/src/qgpgmesignarchivejob.cpp, lang/qt/src/qgpgmesignarchivejob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function signArchiveJob * lang/qt/src/protocol_p.h (Protocol::signArchiveJob): ... and implement it. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-signarchivejob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- GnuPG-bug-id: 6342
* qt: Add job for creating encrypted archivesIngo Klöcker2023-01-278-0/+470
| | | | | | | | | | | | | | | | | | * lang/qt/src/encryptarchivejob.cpp, lang/qt/src/encryptarchivejob.h, lang/qt/src/encryptarchivejob_p.h, lang/qt/src/qgpgmeencryptarchivejob.cpp, lang/qt/src/qgpgmeencryptarchivejob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function encryptArchiveJob * lang/qt/src/protocol_p.h (Protocol::encryptArchiveJob): ... and implement it. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-encryptarchivejob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- GnuPG-bug-id: 6342
* qt: Add data provider for list of file namesIngo Klöcker2023-01-274-0/+186
| | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files and corresponding camel-case header. * lang/qt/src/dataprovider.h: Include interface from gpgme++ when not building. * lang/qt/src/filelistdataprovider.cpp, lang/qt/src/filelistdataprovider.h: New. -- The new data provider simplifies providing a nul-separated list of UTF-8-encoded filenames, e.g. for creating signed or encrypted archives. It is a simple read-only proxy for QByteArrayDataProvider. GnuPG-bug-id: 6342
* qt: Replace Q_DECL_OVERRIDE with overrideIngo Klöcker2023-01-0533-179/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/defaultkeygenerationjob.h, lang/qt/src/hierarchicalkeylistjob.h, lang/qt/src/multideletejob.h, lang/qt/src/protocol_p.h, lang/qt/src/qgpgmeadduseridjob.h, lang/qt/src/qgpgmechangeexpiryjob.h, lang/qt/src/qgpgmechangeownertrustjob.h, lang/qt/src/qgpgmechangepasswdjob.h, lang/qt/src/qgpgmedecryptjob.h, lang/qt/src/qgpgmedecryptverifyjob.h, lang/qt/src/qgpgmedeletejob.h, lang/qt/src/qgpgmedownloadjob.h, lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeexportjob.h, lang/qt/src/qgpgmegpgcardjob.h, lang/qt/src/qgpgmeimportfromkeyserverjob.h, lang/qt/src/qgpgmeimportjob.h, lang/qt/src/qgpgmekeyformailboxjob.h, lang/qt/src/qgpgmekeygenerationjob.h, lang/qt/src/qgpgmekeylistjob.h, lang/qt/src/qgpgmelistallkeysjob.h, lang/qt/src/qgpgmenewcryptoconfig.h, lang/qt/src/qgpgmequickjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmesignencryptjob.h, lang/qt/src/qgpgmesignjob.h, lang/qt/src/qgpgmesignkeyjob.h, lang/qt/src/qgpgmetofupolicyjob.h, lang/qt/src/qgpgmeverifydetachedjob.h, lang/qt/src/qgpgmeverifyopaquejob.h, lang/qt/src/qgpgmewkdlookupjob.h, lang/qt/src/qgpgmewkspublishjob.h, lang/qt/src/threadedjobmixin.h, lang/qt/tests/t-support.h: Replace Q_DECL_OVERRIDE with override -- We require C++11 since a long time.
* qt: Allow deferred start of import jobIngo Klöcker2023-01-053-0/+14
| | | | | | | | | | | | | | * lang/qt/src/importjob.h (ImportJob::startLater): New pure virtual method. * lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmeimportjob.h (QGpgMEImportJob::startLater): New method. * lang/qt/tests/t-import.cpp (ImportTest::testDeferredStart): New. -- This makes it possible to prepare an import job for a deferred start. GnuPG-bug-id: 6323
* qt: Support deferred start of jobsIngo Klöcker2023-01-049-0/+64
| | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/job.cpp, lang/qt/src/job.h (Job::startNow): New method. * lang/qt/src/job_p.h (JobPrivate::start): New pure virtual method. * lang/qt/src/qgpgmechangeexpiryjob.cpp (QGpgMEChangeExpiryJobPrivate::start): New. * lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJobPrivate::start): New. * lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJobPrivate::start): New. * lang/qt/src/qgpgmelistallkeysjob.cpp (QGpgMEListAllKeysJobPrivate::start): New. * lang/qt/src/qgpgmesignencryptjob.cpp (QGpgMESignEncryptJobPrivate::start): New. * lang/qt/src/threadedjobmixin.h (Thread::hasFunction): New method. (ThreadedJobMixin::run, ThreadedJobMixin::setWorkerFunction): New methods. -- startNow() starts a deferred job for which the worker function has been set before. GnuPG-bug-id: 6323
* qt: Explicitly instantiate private job classesIngo Klöcker2023-01-0417-72/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/changeexpiryjob_p.h, lang/qt/src/encryptjob_p.h, lang/qt/src/importjob_p.h, lang/qt/src/listallkeysjob_p.h, lang/qt/src/signencryptjob_p.h: New. * lang/qt/src/changeexpiryjob.cpp, lang/qt/src/encryptjob.cpp, lang/qt/src/importjob.cpp, lang/qt/src/listallkeysjob.cpp, lang/qt/src/signencryptjob.cpp: Move JobPrivate subclasses to the new private header files. * lang/qt/src/job_p.h (jobPrivate): Remove lazy instantiation of private job classes. * lang/qt/src/qgpgmechangeexpiryjob.cpp (class QGpgMEChangeExpiryJobPrivate): New. (QGpgMEChangeExpiryJob::QGpgMEChangeExpiryJob): Instantiate private job class. * lang/qt/src/qgpgmeencryptjob.cpp (class QGpgMEEncryptJobPrivate): New. (QGpgMEEncryptJob::QGpgMEEncryptJob): Instantiate private job class. * lang/qt/src/qgpgmeimportjob.cpp (class QGpgMEImportJobPrivate): New. (QGpgMEImportJob::QGpgMEImportJob): Instantiate private job class. * lang/qt/src/qgpgmelistallkeysjob.cpp (class QGpgMEListAllKeysJobPrivate): New. (QGpgMEListAllKeysJob::QGpgMEListAllKeysJob): Instantiate private job class. * lang/qt/src/qgpgmesignencryptjob.cpp (class QGpgMESignEncryptJobPrivate): New. (QGpgMESignEncryptJob::QGpgMESignEncryptJob): Instantiate private job class. -- We need private job classes corresponding to the concrete leaf classes. This makes the lazy instantiation of the private classes by the job interface classes impossible. GnuPG-bug-id: 6323
* qt: Write path values with Unix directory separatorsIngo Klöcker2022-12-061-1/+1
| | | | | | | | | | | | | * lang/qt/src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfigEntry::setURLValue): Remove conversion to native directory separators. -- Even on Windows Unix directory separators work with all API calls. And some path values also allow "URLs" like tcp://1.2.3.4:10001 which must use '/'. GnuPG-bug-id: 4518
* qt: Allow disabling automatic trust database check on key listingIngo Klöcker2022-11-044-4/+95
| | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (qgpgme_sources): Add listallkeysjob.cpp. * lang/qt/src/listallkeysjob.cpp: New. * lang/qt/src/listallkeysjob.h (enum ListAllKeysJob::Option, typedef ListAllKeysJob::Options, ListAllKeysJob::setOptions, ListAllKeysJob::options): New. * lang/qt/src/qgpgmelistallkeysjob.cpp (list_keys): Set context flag "no-auto-check-trustdb" if requested. (QGpgMEListAllKeysJob::start, QGpgMEListAllKeysJob::exec): Add options to call of list_keys. -- GnuPG-bug-id: 6261
* build,qt: Clean up all generated filesIngo Klöcker2022-10-111-1/+2
| | | | | | * lang/qt/src/Makefile.am (CLEANFILES): Add QGpgmeConfig-w32.cmake.in and QGpgmeQt6Config-w32.cmake.in. --
* qt: Remove obsolete code.Ingo Klöcker2022-10-111-16/+0
| | | | | | | | | * lang/qt/src/qgpgmenewcryptoconfig.cpp (struct Select1St): Remove. -- This struct was never used in this implementation of the crypto config classes and it causes a build error with Qt 6 where QPair is an alias for std::pair.
* build,qt: Allow building QGpgME for Qt 6Ingo Klöcker2022-10-114-8/+304
| | | | | | | | | | | | | | | | | | | | | * configure.ac: Look for Qt 5 and/or Qt 6. Require C++17 if Qt 6 binding is built. Build cmake files QGpgmeConfig* for Qt 5 and QGpgmeQt6Config* for Qt 6. (available_languages): Add "qt5" and "qt6". (WANT_QT5, WANT_QT6): New conditionals. * lang/qt/src/Makefile.am: Keep building libqgpgme for Qt 5. Build libqgpgmeqt6 for Qt 6. * lang/qt/tests/Makefile.am: Build tests for Qt 5 or Qt 6. * lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in, lang/qt/src/QGpgmeQt6Config.cmake.in.in, lang/qt/src/QGpgmeQt6ConfigVersion.cmake.in, m4/qt6.m4: New. -- This makes it possible to build QGpgME optionally for Qt 6.4.0 or later. By default or if the language "qt" is enabled, then QGpgME is built either for Qt 5 (if found) or Qt 6. A build for Qt 5 or Qt 6 can be requested by explicitly enabling the language "qt5" or "qt6". Building QGpgME for Qt 5 and Qt 6 simultaneously is not supported.
* build,qt: Explicitly namespace a few Qt variables for Qt5Ingo Klöcker2022-10-101-2/+2
| | | | | | | | | | | | | | m4/qt.m4: Rename to m4/qt5.m4: this. (FIND_QT): Rename to FIND_QT5. (GPGME_QT): Change variable prefix to GPGME_QT5. (GPGME_QTTEST: Change variable prefix to GPGME_QT5TEST. configure.ac, lang/qt/src/Makefile.am, lang/qt/tests/Makefile.am: Adjust accordingly. -- In preparation to adding support for building qgpgme for Qt6, add the version number to a few variables to avoid confusion.
* qt: Fix building with C++11Ingo Klöcker2022-08-223-2/+11
| | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmerefreshsmimekeysjob.cpp (QGpgMERefreshSMIMEKeysJob::start): Replace 'auto' in lambda with the actual type. * lang/qt/src/qgpgmesignkeyjob.cpp (class TrustSignatureProperties): Add default c'tor and c'tor initializing all members. * lang/qt/src/util.cpp (toFingerprints): Replace 'auto' in lambda with the actual type. * lang/qt/tests/run-exportjob.cpp (createExportJob): Replace 'auto' return type with actual type. -- This fixes compilation with strict C++11. GnuPG-bug-id: 6141
* qt: Fix building with Qt6Ingo Klöcker2022-08-222-4/+2
| | | | | | | | * lang/qt/src/util.cpp, lang/qt/src/util.h: Replace forward declaration with include. -- Based on patch by Laurent Montel
* qt: Make sure expiration time is interpreted as unsigned numberIngo Klöcker2022-08-171-1/+2
| | | | | | | | | | | * lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp (add_subkey): Convert expiration time to uint_least32_t. -- This fixes the corresponding test on 32-bit systems where time_t (the return type of expirationTime()) is a signed 32-bit integer type. GnuPG-bug-id: 6137
* Qt: Fix working with no gpgconf in CryptoConfigAndre Heinecke2022-08-111-3/+4
| | | | | | | | | | | * lang/qt/src/cryptoconfig.cpp (CryptoConfig::entry): Add nullptr checks. -- This fixes a crash when gpgconf is not found. When every return value is NULL. GnuPG-Bug-Id: T6131
* qt: Add job to set the primary user ID of OpenPGP keysIngo Klöcker2022-08-097-0/+237
| | | | | | | | | | | | | | | | * lang/qt/src/qgpgmesetprimaryuseridjob.cpp, lang/qt/src/qgpgmesetprimaryuseridjob.h, lang/qt/src/setprimaryuseridjob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function setPrimaryUserIDJob. * lang/qt/src/protocol_p.h (Protocol::setPrimaryUserIDJob): New. * lang/qt/src/job.cpp, lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/t-setprimaryuserid.cpp: New. * lang/qt/tests/Makefile.am: Add new test. -- GnuPG-bug-id: 5938
* qt: Remove job for refreshing OpenPGP keysIngo Klöcker2022-08-047-299/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* qt: Allow setting the file name of signed and encrypted dataIngo Klöcker2022-07-054-8/+82
| | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (qgpgme_sources): Add signencryptjob.cpp. * lang/qt/src/signencryptjob.cpp: New. * lang/qt/src/signencryptjob.h (class SignEncryptJob): Add member functions setFileName, fileName. * lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt): Set file name of input. (sign_encrypt_qba, QGpgMESignEncryptJob::exec, QGpgMESignEncryptJob::start): Pass file name to sign_encrypt resp. sign_encrypt_qba. -- This makes it possible to store the original name of a signed and encrypted file in the resulting data. GnuPG-bug-id: 6056
* qt: Allow setting the file name of encrypted dataIngo Klöcker2022-07-054-9/+84
| | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (qgpgme_sources): Add encryptjob.cpp. * lang/qt/src/encryptjob.cpp: New. * lang/qt/src/encryptjob.h (class EncryptJob): Add member functions setFileName, fileName. * lang/qt/src/qgpgmeencryptjob.cpp (encrypt): Set file name of input. (encrypt_qba, QGpgMEEncryptJob::exec, QGpgMEEncryptJob::start): Pass file name to encrypt resp. encrypt_qba. -- This makes it possible to store the original name of an encrypted file in the encryption result. GnuPG-bug-id: 6056
* qt: Fix filename of cmake config files for w32Ingo Klöcker2022-07-041-1/+1
| | | | | | * lang/qt/src/Makefile.am (EXTRA_DIST): Add QGpgmeConfig-w32.cmake.in.in. --
* qt: Add #include <QStringList> needed for building against qt6Laurent Montel2022-07-044-7/+6
| | | | | | | | | | | * lang/qt/src/downloadjob.h, lang/qt/src/exportjob.h, lang/qt/src/keylistjob.h lang/qt/src/refreshkeysjob.h: in qt6 we need to use #include <QStringList> -- It fixes some compile qt6 compile error. Signed-off-by: Laurent Montel <[email protected]>
* qt: Prevent u32 overflow when calculating expiration dateIngo Klöcker2022-06-102-4/+4
| | | | | | | | | | | | | * 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
* qt: Revert change of result signal of RefreshKeysJobIngo Klöcker2022-05-051-1/+1
| | | | | | | | | | | | * 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-047-28/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: 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: 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-311-5/+37
| | | | | | | | | | | | | | | | * 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: Add job to revoke own OpenPGP keysIngo Klöcker2022-03-307-0/+277
| | | | | | | | | | | | | | | | | | | | * 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-037-0/+249
| | | | | | | | | | | | | | | | | | * 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-175-9/+17
| | | | | | | | | * 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. --