aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpp,qt: Remove C++ and Qt bindingsIngo Klöcker2025-02-03183-21949/+0
| | | | | | | | | | | | | | | | | * README: Update. * configure.ac: Remove checks, variables and file generations related to the C++/Qt bindings. Remove cpp and qt* from available_languages and default_languages. * lang/Makefile.am (DIST_SUBDIRS): Remove cpp and qt. * lang/cpp, lang/qt: Remove. * m4/ax_check_compile_flag.m4, m4/ax_cxx_compile_stdcxx.m4, m4/ax_gcc_func_attribute.m4, m4/pkg.m4, m4/qt5.m4, m4/qt6.m4: Remove. -- The C++ and Qt bindings have been moved to separate Git repositories: gpgmepp and gpgmeqt. GnuPG-bug-id: 7262
* qt: Fix typoIngo Klöcker2024-10-231-1/+1
| | | | | * lang/qt/src/Makefile.am (camelcase_headers): Fix typo in header name. --
* qt: Put attributes before declarationsIngo Klöcker2024-10-231-1/+1
| | | | | | * lang/qt/src/downloadjob.h (DownloadJob::start): Move QGPGME_DEPRECATED before the whole function declaration. --
* qt: Add support for new context flag "proc-all-sigs"Ingo Klöcker2024-08-2616-8/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/decryptverifyarchivejob.cpp, lang/qt/src/decryptverifyarchivejob.h (DecryptVerifyArchiveJob): Add member functions setProcessAllSignatures, processAllSignatures. * lang/qt/src/decryptverifyarchivejob_p.h (DecryptVerifyArchiveJobPrivate): Add member m_processAllSignatures. * lang/qt/src/decryptverifyjob.cpp, lang/qt/src/decryptverifyjob.h (DecryptVerifyJob): Add member functions setProcessAllSignatures, processAllSignatures. * lang/qt/src/decryptverifyjob_p.h (DecryptVerifyJobPrivate): Add member m_processAllSignatures. * lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (decrypt_verify_from_file_name): Add argument "processAllSignatures". Set context flag "proc-all-sigs" if requested. (QGpgMEDecryptVerifyArchiveJob::start): Set context flag "proc-all-sigs" if requested. (QGpgMEDecryptVerifyArchiveJobPrivate::startIt): Pass m_processAllSignatures to decrypt_verify_from_file_name. * lang/qt/src/qgpgmedecryptverifyjob.cpp (decrypt_verify_from_filename): Add argument "processAllSignatures". Set context flag "proc-all-sigs" if requested. (QGpgMEDecryptVerifyJob::start, QGpgMEDecryptVerifyJob::exec): Set context flag "proc-all-sigs" if requested. (QGpgMEDecryptVerifyJobPrivate::startIt): Pass m_processAllSignatures to decrypt_verify_from_filename. * lang/qt/src/qgpgmeverifydetachedjob.cpp (verify_from_filename): Add argument "processAllSignatures". Set context flag "proc-all-sigs" if requested. (QGpgMEVerifyDetachedJob::start, QGpgMEVerifyDetachedJob::exec): Set context flag "proc-all-sigs" if requested. (QGpgMEVerifyDetachedJobPrivate::startIt): Pass m_processAllSignatures to decrypt_verify_from_filename. * lang/qt/src/qgpgmeverifyopaquejob.cpp (verify_from_filename): Add argument "processAllSignatures". Set context flag "proc-all-sigs" if requested. (QGpgMEVerifyOpaqueJob::start, QGpgMEVerifyOpaqueJob::exec): Set context flag "proc-all-sigs" if requested. (QGpgMEVerifyOpaqueJobPrivate::startIt): Pass m_processAllSignatures to decrypt_verify_from_filename. * lang/qt/src/verifydetachedjob.cpp, lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Add member functions setProcessAllSignatures, processAllSignatures. * lang/qt/src/verifydetachedjob_p.h (VerifyDetachedJobPrivate): Add member m_processAllSignatures. * lang/qt/src/verifyopaquejob.cpp, lang/qt/src/verifyopaquejob.h (VerifyOpaqueJob): Add member functions setProcessAllSignatures, processAllSignatures. * lang/qt/src/verifyopaquejob_p.h (VerifyOpaqueJobPrivate): Add member m_processAllSignatures. * lang/qt/tests/run-decryptverifyarchivejob.cpp, lang/qt/tests/run-decryptverifyjob.cpp, lang/qt/tests/run-verifydetachedjob.cpp, lang/qt/tests/run-verifyopaquejob.cpp (struct CommandLineOptions): Add member processAllSignatures. (parseCommandLine): Add command line option --process-all-signatures. (main): Pass new option to the job. -- The new option processAllSignatures is added to all jobs that verify data signatures. By enabling this option, one can tell gpg not to stop checking signatures after the first bad signature. GnuPG-bug-id: 6870
* qt: Use --quick-set-ownertrust if availableIngo Klöcker2024-08-071-1/+16
| | | | | | | | | | | | | | | | * lang/qt/src/qgpgmechangeownertrustjob.cpp (set_owner_trust): New. (QGpgMEChangeOwnerTrustJob::start): Use set_owner_trust if gpg is new enough. * lang/qt/tests/t-ownertrust.cpp (ChangeOwnerTrustTest::testChangeOwnerTrust): Log unexpected error. -- Using the --quick-set-ownertrust command to set the owner trust is much more robust than using the edit interface. Prefer the former if gpg supports it. GnuPG-bug-id: 7239
* qt: Support disabling and enabling of keysIngo Klöcker2024-08-076-7/+171
| | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (QuickJob): Move definition of constructor and destructor and inclusion of the moc file to quickjob.cpp. * lang/qt/src/qgpgmequickjob.cpp (class QGpgMEQuickJobPrivate): New. (QGpgMEQuickJob::QGpgMEQuickJob): Instantiate private job class. (set_key_enabled): New. * lang/qt/src/quickjob.cpp: New. * lang/qt/src/quickjob.h (class QuickJob): Add member function startSetKeyEnabled. * lang/qt/src/quickjob_p.h: New. * lang/qt/tests/Makefile.am: Add new test for Qt 5 and Qt 6. * lang/qt/tests/t-disablekey.cpp: New. -- GnuPG-bug-id: 7239
* build,qt: Fix include path in CMake filesIngo Klöcker2024-07-221-4/+4
| | | | | | | | | * lang/qt/src/Makefile.am (QGpgmeConfig.cmake, QGpgmeQt6Config.cmake): Use new variables includeprefix{5,6} instead of replaced variable includeprefix. -- GnuPG-bug-id: 7205
* build,qt: Don't put generated camel-case headers in tarballIngo Klöcker2024-07-181-2/+2
| | | | | | | * lang/qt/src/Makefile.am: Change camelcase5include_HEADERS to nodist_camelcase5include_HEADERS. Change camelcase6include_HEADERS to nodist_camelcase6include_HEADERS. --
* build,qt: Allow building Qt 5 bindings and Qt 6 bindingsIngo Klöcker2024-07-181-4/+5
| | | | | | | | | | | | | | | | | | * configure.ac: Remove "qt" from default_languages. Add "qt5 qt6" to default_languages. Remove "qt" from help for --enable-languages. Don't fail anymore if "qt5" and "qt6" are enabled. Warn that "qt" is deprecated if it was enabled. * lang/qt/src/Makefile.am (libqgpgme_la, libqgpgmeqt6_la): New. (lib_LTLIBRARIES): Set Qt 5 and/or Qt 6 variant of libqgpgme. (AM_CPPFLAGS): Replace with libqgpgme_la_CPPFLAGS for Qt 5 and libqgpgmeqt6_la_CPPFLAGS for Qt 6. -- This makes it possible to build QGpgME simultaneously for Qt 5 and Qt 6. By default, QGpgME is now built for all versions of Qt that are found. Specifying "qt" as language is deprecated. GnuPG-bug-id: 7205
* build,qt: Decouple generation of moc filesIngo Klöcker2024-07-181-13/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/qt5.m4: Export moc for Qt 5 in variable MOC5. Unset temporary MOC2. * m4/qt6.m4: Export moc for Qt 6 in variable MOC6. * lang/qt/src/Makefile.am: Generate .moc5 files from .h files. Generate .moc forwarding headers in moc5 subfolder. Add moc5 subfolder to include paths for Qt 5-based qgpgme library. Ditto for Qt 6. Clean up moc5 and moc6 subfolders. * lang/qt/tests/Makefile.am: List tests and test runners for Qt 5 and Qt 6. Generate .moc5 files from .cpp files of tests. Generate .moc forwarding headers in moc5 subfolder. Generate .hmoc file from t-support.h directly in moc5 subfolder. Add moc5 subfolder to include paths for all Qt 5-based tests and runners. Ditto for Qt 6. Specify sources, LDADD and CPPFLAGS for all tests and test runners for Qt 5 and Qt 6. Clean up moc5 and moc6 subfolders. -- The output of Qt 5's moc and Qt 6's moc is incompatible. Therefore, we need to generate different .moc files for Qt 5 and Qt 6 to support co-building of the Qt 5 and Qt 6 bindings. The duplication of the listing of the tests couldn't be avoided because automake doesn't understand `the_tests5 = $(the_tests:%=%5)` and couldn't match the tests with their _SOURCES. Maybe some m4 programming would have helped, but that would have made the Makefiles even more unreadable. GnuPG-bug-id: 7205
* build,qt: Remove include directories on uninstallIngo Klöcker2024-07-181-1/+14
| | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (uninstall-include-dirs-qt5, uninstall-include-dirs-qt6): New targets. (uninstall_include_dirs_qt5, uninstall_include_dirs_qt6): New variables. (uninstall-local): Replace with... (uninstall-hook): ...this. Add new uninstall_include_dirs_qt* variables. -- We have to use uninstall-hook because uninstall-local runs before the header files have been removed from the include folders we want to remove. GnuPG-bug-id: 7205
* build,qt: Decouple handling of include headersIngo Klöcker2024-07-181-7/+12
| | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (includeprefix): Replace with... (includeprefix5, includeprefix6): ...these. (qgpgmeincludedir): Replace with... (qgpgme5includedir, qgpgme6includedir): ...these. (qgpgmeinclude_HEADERS): Replace with... (qgpgme5include_HEADERS, qgpgme6include_HEADERS): ...these. (nodist_qgpgmeinclude_HEADERS): Replace with... (nodist_qgpgme5include_HEADERS, nodist_qgpgme6include_HEADERS): ..these. (camelcaseincludedir): Replace with... (camelcase5includedir, camelcase6includedir): ...these. (camelcaseinclude_HEADERS): Replace with... (camelcase5include_HEADERS, camelcase6include_HEADERS): ...these. -- This prepares the code for the case that WANT_QT5 and WANT_QT6 are both true. GnuPG-bug-id: 7205
* build,qt: Decouple (un)install of CMake filesIngo Klöcker2024-07-181-6/+10
| | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (install-cmake-files): Rename target to install-cmake-files-qt5 and install-cmake-files-qt6. (uninstall-cmake-files): Rename target to uninstall-cmake-files-qt5 and uninstall-cmake-files-qt6. (install_cmake_files_qt5, uninstall_cmake_files_qt5, install_cmake_files_qt6, uninstall_cmake_files_qt6): New variables. (install-data-local): Depend on both install-cmake-files-qt* targets. (uninstall-local): Depend on both uninstall-cmake-files-qt* targets. -- This prepares the targets for the case that WANT_QT5 and WANT_QT6 are both true. GnuPG-bug-id: 7205
* qt: Replace usage of deprecated Error::asStringIngo Klöcker2024-07-056-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/debug.cpp (operator<<): Use Error::asStdString instead of Error::asString. * lang/qt/src/qgpgmedecryptverifyjob.cpp (decrypt_verify), lang/qt/src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfigComponent::sync), lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Use QDebug operator for Error instead of Error::asString. * lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Use errorAsString instead of Error::asString. * lang/qt/src/util.h (errorAsString): New. * lang/qt/tests/run-decryptverifyarchivejob.cpp (main), lang/qt/tests/run-decryptverifyjob.cpp (main), lang/qt/tests/run-encryptarchivejob.cpp (main), lang/qt/tests/run-encryptjob.cpp (main), lang/qt/tests/run-exportjob.cpp (main), lang/qt/tests/run-importjob.cpp (main), lang/qt/tests/run-receivekeysjob.cpp (main), lang/qt/tests/run-refreshkeysjob.cpp (main), lang/qt/tests/run-signarchivejob.cpp (main), lang/qt/tests/run-signjob.cpp (main), lang/qt/tests/run-verifydetachedjob.cpp (main), lang/qt/tests/run-verifyopaquejob.cpp (main), lang/qt/tests/run-wkdrefreshjob.cpp (main), lang/qt/tests/t-ownertrust.cpp (testChangeOwnerTrust), lang/qt/tests/t-remarks.cpp (testRemarkOwnKey), lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Use QDebug operator for Error instead of Error::asString. * lang/qt/tests/t-changeexpiryjob.cpp (all test functions), lang/qt/tests/t-trustsignatures.cpp (all test functions), lang/qt/tests/t-various.cpp (testSignKeyWithoutExpiration, testSignKeyWithExpiration): Use errorAsString instead of Error::asString. -- GnuPG-bug-id: 7188
* qt: Always include C++ binding headers with gpgme++/ prefixIngo Klöcker2024-07-0596-329/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am, lang/qt/tests/Makefile.am (AM_CPPFLAGS): Add builddir instead of srcdir of C++ bindings as include path. * lang/qt/src/changeexpiryjob.cpp, lang/qt/src/changeexpiryjob.h, lang/qt/src/changeownertrustjob.h, lang/qt/src/dataprovider.cpp, lang/qt/src/dataprovider.h, lang/qt/src/debug.cpp, lang/qt/src/decryptverifyarchivejob.cpp, lang/qt/src/decryptverifyarchivejob.h, lang/qt/src/encryptarchivejob.cpp, lang/qt/src/encryptarchivejob.h, lang/qt/src/encryptjob.h, lang/qt/src/encryptjob_p.h, lang/qt/src/filelistdataprovider.cpp, lang/qt/src/filelistdataprovider.h, lang/qt/src/hierarchicalkeylistjob.h, lang/qt/src/importjob.cpp, lang/qt/src/importjob.h, lang/qt/src/importjob_p.h, lang/qt/src/job.h, lang/qt/src/keyformailboxjob.h, lang/qt/src/keylistjob.h, lang/qt/src/listallkeysjob.h, lang/qt/src/multideletejob.cpp, lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp, lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmebackend.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmedecryptjob.h, lang/qt/src/qgpgmedecryptverifyarchivejob.cpp, lang/qt/src/qgpgmedecryptverifyarchivejob.h, lang/qt/src/qgpgmedecryptverifyjob.cpp, lang/qt/src/qgpgmedecryptverifyjob.h, lang/qt/src/qgpgmedeletejob.cpp, lang/qt/src/qgpgmedownloadjob.cpp, lang/qt/src/qgpgmeencryptarchivejob.cpp, lang/qt/src/qgpgmeencryptarchivejob.h, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmeencryptjob.h, lang/qt/src/qgpgmeexportjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.h, lang/qt/src/qgpgmeimportjob.cpp, lang/qt/src/qgpgmeimportjob.h, lang/qt/src/qgpgmekeyformailboxjob.h, lang/qt/src/qgpgmekeygenerationjob.cpp, lang/qt/src/qgpgmekeygenerationjob.h, lang/qt/src/qgpgmekeylistjob.cpp, lang/qt/src/qgpgmekeylistjob.h, lang/qt/src/qgpgmelistallkeysjob.cpp, lang/qt/src/qgpgmelistallkeysjob.h, lang/qt/src/qgpgmenewcryptoconfig.cpp, lang/qt/src/qgpgmenewcryptoconfig.h, lang/qt/src/qgpgmequickjob.cpp, lang/qt/src/qgpgmereceivekeysjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.cpp, lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmerevokekeyjob.cpp, lang/qt/src/qgpgmesetprimaryuseridjob.cpp, lang/qt/src/qgpgmesignarchivejob.cpp, lang/qt/src/qgpgmesignarchivejob.h, lang/qt/src/qgpgmesignencryptarchivejob.cpp, lang/qt/src/qgpgmesignencryptarchivejob.h, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignencryptjob.h, lang/qt/src/qgpgmesignjob.cpp, lang/qt/src/qgpgmesignjob.h, lang/qt/src/qgpgmesignkeyjob.cpp, lang/qt/src/qgpgmetofupolicyjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.h, lang/qt/src/qgpgmeverifyopaquejob.cpp, lang/qt/src/qgpgmeverifyopaquejob.h, lang/qt/src/qgpgmewkdlookupjob.cpp, lang/qt/src/qgpgmewkdrefreshjob.cpp, lang/qt/src/qgpgmewkdrefreshjob.h, lang/qt/src/qgpgmewkspublishjob.cpp, lang/qt/src/quickjob.h, lang/qt/src/signarchivejob.cpp, lang/qt/src/signarchivejob.h, lang/qt/src/signencryptarchivejob.cpp, lang/qt/src/signencryptarchivejob.h, lang/qt/src/signencryptjob.h, lang/qt/src/signencryptjob_p.h, lang/qt/src/signjob.h, lang/qt/src/signjob_p.h, lang/qt/src/threadedjobmixin.cpp, lang/qt/src/threadedjobmixin.h, lang/qt/src/tofupolicyjob.h, lang/qt/src/util.cpp, lang/qt/src/wkdlookupresult.cpp, lang/qt/src/wkdlookupresult.h, lang/qt/src/wkdrefreshjob_p.h, lang/qt/tests/run-decryptverifyarchivejob.cpp, lang/qt/tests/run-decryptverifyjob.cpp, lang/qt/tests/run-encryptarchivejob.cpp, lang/qt/tests/run-encryptjob.cpp, lang/qt/tests/run-exportjob.cpp, lang/qt/tests/run-importjob.cpp, lang/qt/tests/run-keyformailboxjob.cpp, lang/qt/tests/run-receivekeysjob.cpp, lang/qt/tests/run-refreshkeysjob.cpp, lang/qt/tests/run-signarchivejob.cpp, lang/qt/tests/run-signjob.cpp, lang/qt/tests/run-verifydetachedjob.cpp, lang/qt/tests/run-verifyopaquejob.cpp, lang/qt/tests/run-wkdrefreshjob.cpp, lang/qt/tests/t-addexistingsubkey.cpp, lang/qt/tests/t-changeexpiryjob.cpp, lang/qt/tests/t-config.cpp, lang/qt/tests/t-decryptverify.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-revokekey.cpp, lang/qt/tests/t-setprimaryuserid.cpp, lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.h, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-trustsignatures.cpp, lang/qt/tests/t-various.cpp, lang/qt/tests/t-verify.cpp, lang/qt/tests/t-wkdlookup.cpp, lang/qt/tests/t-wkspublish.cpp: Include GpgME++ headers with gpgme++/ prefix. -- This prepares the Qt bindings for building them separately from the C++ bindings. GnuPG-bug-id: 7110
* qt: Allow appending a detached signature to an existing fileIngo Klöcker2024-06-184-7/+62
| | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmesignjob.cpp (sign_to_filename): Add argument "appendSignature". Append new detached signature to an existing file if requested. * lang/qt/src/signjob.cpp, lang/qt/src/signjob.h (class SignJob): Add member functions setAppendSignature, appendSignatureEnabled. * lang/qt/src/signjob_p.h (struct SignJobPrivate): Add member m_appendSignature. * lang/qt/tests/run-signjob.cpp (struct CommandLineOptions): Add members signingFlags, appendSignature. Initialize armor. (parseCommandLine): Add command line options --detach-sign and --append. (main): Do not exit if output file exists and append is enabled. Pass new options to the job. -- This change simplifies cross-signing a document by appending additional detached signatures to a file with already existing detached signatures. GnuPG-bug-id: 6867
* qt,build: Install headers for Qt 5 and Qt 6 in different locationsIngo Klöcker2024-06-171-6/+12
| | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am (includeprefix): New. (qgpgmeincludedir, camelcaseincludedir): Add $(includeprefix). (QGpgmeConfig.cmake, QGpgmeQt6Config.cmake): Add $(includeprefix) to replacement for @resolved_includedir@. -- This installs the headers for Qt 5 in $(includedir)/qgpgme-qt5 and the headers for Qt 6 in $(includedir)/qgpgme-qt6. For users of the CMake files the change will be transparent, i.e. they don't have to do anything. Packagers will have to change their scripts but in the end this change will make their lifes easier. GnuPG-bug-id: 7161
* qt: Specify import options as list of strings instead of as stringIngo Klöcker2024-06-134-8/+8
| | | | | | | | | | | | | | | | | | | | * lang/qt/src/importjob.cpp, lang/qt/src/importjob.h (setImportOptions): Change type of argument "options" to QStringList. (importOptions): Change return type to QStringList. * lang/qt/src/importjob_p.h (struct ImportJobPrivate): Change type of member m_importOptions to QStringList. * lang/qt/src/qgpgmeimportjob.cpp (import_qba): Change type of argument "importOptions" to QStringList. Join list of import options with ',' when setting the "import-options" context flag. * lang/qt/tests/t-import.cpp (ImportTest::testImportWithImportOptions): Adapt to API change. -- This makes the API that was introduced with the previous commit easier to use. GnuPG-bug-id: 7152
* qt: Allow specifying import options when importing keysIngo Klöcker2024-06-124-4/+24
| | | | | | | | | | | | | | | * lang/qt/src/importjob.cpp, lang/qt/src/importjob.h (class ImportJob): Add member functions setImportOptions and importOptions. * lang/qt/src/importjob_p.h (struct ImportJobPrivate): Add member m_importOptions. * lang/qt/src/qgpgmeimportjob.cpp (import_qba): Add arg importOptions and adjust the callers. Set import options context flag. * lang/qt/tests/t-import.cpp (ImportTest): Add member function testImportWithImportOptions. -- GnuPG-bug-id: 7152
* qt: Fix license headers of MakefilesIngo Klöcker2024-06-101-6/+6
| | | | | | | | | | * lang/qt/Makefile.am, lang/qt/src/Makefile.am: Files are part of QGpgme. Fix wrong package name (GPGME-CL -> QGpgME). Replace references to LGPL with references to GPL. -- The files were already licensed under the GPL but the license headers contained multiple (copy&paste?) errors.
* qt: Fix license headers of CMake config filesIngo Klöcker2024-06-106-18/+18
| | | | | | | | | | | | | | | | * lang/qt/src/QGpgmeConfig-w32.cmake.in.in, lang/qt/src/QGpgmeConfig.cmake.in.in, lang/qt/src/QGpgmeConfigVersion.cmake.in: Files are part of QGpgME. Fix copy&paste error (GPGME-CL -> QGpgME). Fix reference to license to check for details. * lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in, lang/qt/src/QGpgmeQt6Config.cmake.in.in, lang/qt/src/QGpgmeQt6ConfigVersion.cmake.in: Files are part of QGpgME. Fix reference to license to check for details. -- The files were already licensed under the GPL but the license headers contained multiple (copy&paste?) errors.
* qt: Fix license headers of dataprovider.*Ingo Klöcker2024-06-102-30/+30
| | | | | | | | | * lang/qt/src/dataprovider.cpp, lang/qt/src/dataprovider.h: Change license header from LGPL to GPL. -- QGpgME is released under the GPL. As part of QGpgME these files (that were originally licensed under the LGPL) are released under the GPL.
* qt,cpp: Implement adding ADSKs to existing keysTobias Fella2024-05-223-0/+15
| | | | | | | | * lang/cpp/src/context.cpp: Add functions for adding ADSKs. * lang/cpp/src/context.h: Ditto. * lang/qt/src/qgpgmequickjob.cpp: Add implementation of ADSK job. * lang/qt/src/qgpgmequickjob.h: Ditto. * lang/qt/src/quickjob.h: Add job for adding ADSKs.
* qt: Avoid bogus stringop-overread warningIngo Klöcker2024-05-211-2/+1
| | | | | | | | | * lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Use QByteArray overload of QString::fromUtf8. -- There's no need to make the code more complicated than necessary. Unless we want to provoke weird compiler warnings. :-)
* qt: Fix warning about missing returnIngo Klöcker2024-05-211-1/+2
| | | | | | | | | * lang/qt/src/qgpgmeexportjob.cpp (ExportJob::exec): Return a value and remove unused argument names. -- ExportJob::exec is never executed because its virtual overload is always used. Therefore it doesn't matter what value we return.
* Qt: Fix windows build of new jobsAndre Heinecke2024-03-136-7/+7
| | | | | -- See git log for changes.
* qt: Add function for synchronously executing ExportJobTobias Fella2024-01-223-0/+21
| | | | | | | | | | * lang/qt/src/exportjob: Add exec function. * lang/qt/src/qgpgmeexportjob.cpp: Implement exec function. * lang/qt/src/qgpgmeexportjob.h: Override exec function. -- GnuPG-Bug-Id: 6893
* qt: Remove superfluous virtual overrides and member variablesIngo Klöcker2024-01-1929-145/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp (QGpgMEAddExistingSubkeyJob::exec): Remove call of resultHook. * lang/qt/src/qgpgmedecryptjob.cpp (QGpgMEDecryptJob::exec): Remove call of resultHook. (QGpgMEDecryptJob::resultHook): Remove. * lang/qt/src/qgpgmedecryptjob.h (QGpgMEDecryptJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmedecryptverifyjob.cpp (QGpgMEDecryptVerifyJob::exec): Remove call of resultHook. (QGpgMEDecryptVerifyJob::resultHook): Remove. * lang/qt/src/qgpgmedecryptverifyjob.h (QGpgMEDecryptVerifyJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJob::exec): Remove call of resultHook. (QGpgMEEncryptJob::resultHook): Remove. * lang/qt/src/qgpgmeencryptjob.h (QGpgMEEncryptJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmegpgcardjob.cpp (QGpgMEGpgCardJob::exec): Remove call of resultHook. * lang/qt/src/qgpgmeimportfromkeyserverjob.cpp (QGpgMEImportFromKeyserverJob::exec): Remove call of resultHook. (QGpgMEImportFromKeyserverJob::resultHook): Remove. * lang/qt/src/qgpgmeimportfromkeyserverjob.h (QGpgMEImportFromKeyserverJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJob::exec): Remove call of resultHook. (QGpgMEImportJob::resultHook): Remove. * lang/qt/src/qgpgmeimportjob.h (QGpgMEImportJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmekeyformailboxjob.cpp (QGpgMEKeyForMailboxJob::exec): Remove call of resultHook. * lang/qt/src/qgpgmekeylistjob.cpp (QGpgMEKeyListJob::QGpgMEKeyListJob): Remove initialization of mResult. (QGpgMEKeyListJob::resultHook): Do not set (removed) mResult. * lang/qt/src/qgpgmekeylistjob.h (QGpgMEKeyListJob): Remove member mResult. * lang/qt/src/qgpgmelistallkeysjob.cpp (QGpgMEListAllKeysJob::QGpgMEListAllKeysJob): Remove initialization of mResult. (QGpgMEListAllKeysJob::exec): Remove call of resultHook. (QGpgMEListAllKeysJob::resultHook): Remove. * lang/qt/src/qgpgmelistallkeysjob.h (QGpgMEListAllKeysJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmereceivekeysjob.cpp (QGpgMEReceiveKeysJob::exec): Remove call of resultHook. (QGpgMEReceiveKeysJob::resultHook): Remove. * lang/qt/src/qgpgmereceivekeysjob.h (QGpgMEReceiveKeysJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmerevokekeyjob.cpp (QGpgMERevokeKeyJob::exec): Remove call of resultHook. * lang/qt/src/qgpgmesignencryptjob.cpp (QGpgMESignEncryptJob::exec): Remove call of resultHook. (QGpgMESignEncryptJob::resultHook): Remove. * lang/qt/src/qgpgmesignencryptjob.h (QGpgMESignEncryptJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmesignjob.cpp (QGpgMESignJob::exec): Remove call of resultHook. (QGpgMESignJob::resultHook): Remove. * lang/qt/src/qgpgmesignjob.h (QGpgMESignJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmeverifydetachedjob.cpp (QGpgMEVerifyDetachedJob::exec): Remove call of resultHook. (QGpgMEVerifyDetachedJob::resultHook): Remove. * lang/qt/src/qgpgmeverifydetachedjob.h (QGpgMEVerifyDetachedJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmeverifyopaquejob.cpp (QGpgMEVerifyOpaqueJob::exec): Remove call of resultHook. (QGpgMEVerifyOpaqueJob::resultHook): Remove. * lang/qt/src/qgpgmeverifyopaquejob.h (QGpgMEVerifyOpaqueJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmewkdlookupjob.cpp (QGpgMEWKDLookupJob::exec): Remove call of resultHook. -- All overrides of resultHook (except for the one of QGpgMEKeyListJob) are superfluous. All the resultHook overrides do is store the result in a member variable which is then returned in exec() (which just before returning calls resultHook). The member variable the result is stored in is only ever used by exec(). So exec() can simply return the result directly. Some Job subclasses call resultHook without overriding it. That's equally useless because the default implementation of resultHook is empty. The only resultHook override that does anything useful is the one of QGpgMEKeyListJob.
* qt: Remove left-over mentions of showErrorDialogIngo Klöcker2024-01-195-32/+1
| | | | | | | | | | | | | * lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportjob.cpp: Remove obsolete comment. * lang/qt/src/qgpgmekeylistjob.cpp, lang/qt/src/qgpgmelistallkeysjob.cpp: Remove long obsolete, #if 0'ed out definitions of showErrorDialog. -- Informing the users about errors is the responsibility of the users of the QGpgME Job API since a long time.
* qt: Pass home directory with forward slashes when launching dirmngrIngo Klöcker2024-01-091-2/+4
| | | | | | | | | | | | | * lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Replace backslashes with forward slashes in homedir returned by GpgME::dirInfo. -- This works around a bug which causes backslashes to be escaped (doubled) twice on Windows, once by gpgme_op_spawn and once by the spawn helper gpgme-w32spawn. The next versions of GnuPG 2.2 and 2.4 also have a workaround for this. GnuPG-bug-id: 6833
* qt: Fix validity for (sub)keys generated using QGpgMEQuickJobTobias Fella2024-01-081-2/+4
| | | | | | | | | | | * lang/qt/src/qgpgmequickjob.cpp: Fix expiration calculation -- The job calculates the validity as the seconds since epoch, while GPG expects the seconds since the current time. This leads to the validity being significantly longer than expected. GnuPG-Bug-Id: 6889
* qt: Support verification of detached signatures directly from filesIngo Klöcker2024-01-056-10/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (VerifyDetachedJob): Move definition of constructor and destructor and inclusion of the moc file to the corresponding .cpp file. * lang/qt/src/verifydetachedjob.cpp: New. * lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Add member functions setSignatureFile, signatureFile, setSignedFile, signedFile. * lang/qt/src/verifydetachedjob_p.h: New. * lang/qt/src/qgpgmeverifydetachedjob.cpp (class QGpgMEVerifyDetachedJobPrivate): New. (QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob): Instantiate private job class. (verify_from_filename): New. * lang/qt/tests/Makefile.am: Add new test program. * lang/qt/tests/run-verifydetachedjob.cpp: New. -- This makes it possible to tell gpg to read the input directly from the specified files bypassing GpgME's Data IO when verifying a detached signature. GnuPG-bug-id: 6550
* qt,doc: Document that Job::startIt() doesn't self-destruct Job on errorIngo Klöcker2023-12-221-1/+4
| | | | | -- GnuPG-bug-id: 6550
* qt: Support verification of opaque signed data directly to/from filesIngo Klöcker2023-12-226-10/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (VerifyOpaqueJob): Move definition of constructor and destructor and inclusion of the moc file to the corresponding .cpp file. * lang/qt/src/verifyopaquejob.cpp: New. * lang/qt/src/verifyopaquejob.h (VerifyOpaqueJob): Add member functions setInputFile, inputFile, setOutputFile, outputFile. * lang/qt/src/verifyopaquejob_p.h: New. * lang/qt/src/qgpgmeverifyopaquejob.cpp (class QGpgMEVerifyOpaqueJobPrivate): New. (QGpgMEVerifyOpaqueJob::QGpgMEVerifyOpaqueJob): Instantiate private job class. (verify_from_filename): New. * lang/qt/tests/Makefile.am: Add new test program. * lang/qt/tests/run-verifyopaquejob.cpp: New. -- This makes it possible to tell gpg to read the input and write the output directly to a specified file bypassing GpgME's Data IO when verifying an opaque signed (or clear signed) file. GnuPG-bug-id: 6550
* qt: Support decryption (with verification) directly to/from filesIngo Klöcker2023-12-226-10/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (DecryptVerifyJob): Move definition of constructor and destructor and inclusion of the moc file to the corresponding .cpp file. * lang/qt/src/decryptverifyjob.cpp: New. * lang/qt/src/decryptverifyjob.h (DecryptVerifyJob): Add member functions setInputFile, inputFile, setOutputFile, outputFile. * lang/qt/src/decryptverifyjob_p.h: New. * lang/qt/src/qgpgmedecryptverifyjob.cpp (class QGpgMEDecryptVerifyJobPrivate): New. (QGpgMEDecryptVerifyJob::QGpgMEDecryptVerifyJob): Instantiate private job class. (decrypt_verify_from_filename): New. * lang/qt/tests/Makefile.am: Add new test program. * lang/qt/tests/run-decryptverifyjob.cpp: New. -- This makes it possible to tell gpg to read the input and write the output directly to a specified file bypassing GpgME's Data IO when decrypting (and verifying) a file. GnuPG-bug-id: 6550
* qt: Support writing/reading signed/encrypted files directly to/from fileIngo Klöcker2023-12-2114-38/+699
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (EncryptJob, SignJob, SignEncryptJob): Move definition of constructor and destructor and inclusion of the moc file to the corresponding .cpp files. * lang/qt/src/encryptjob.cpp (EncryptJob): Define constructor. Define destructor as default. Include moc file. * lang/qt/src/encryptjob.cpp, lang/qt/src/encryptjob.h (EncryptJob): Add member functions setRecipients, recipients, setInputFile, inputFile, setOutputFile, outputFile, setEncryptionFlags, encryptionFlags. * lang/qt/src/encryptjob_p.h (EncryptJobPrivate): Add members m_recipients, m_inputFilePath, m_outputFilePath, m_encryptionFlags. * lang/qt/src/qgpgmeencryptjob.cpp (encrypt_to_filename): New. (QGpgMEEncryptJobPrivate::startIt): Start the job with the values from the member variables. * lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt_to_filename): New. (QGpgMESignEncryptJobPrivate::startIt): Start the job with the values from the member variables. * lang/qt/src/qgpgmesignjob.cpp (class QGpgMESignJobPrivate): New. (QGpgMESignJob::QGpgMESignJob): Instantiate private job class. (sign_to_filename): New. * lang/qt/src/signencryptjob.cpp (SignEncryptJob): Define constructor. Define destructor as default. Include moc file. * lang/qt/src/signencryptjob.cpp, lang/qt/src/signencryptjob.h (SignEncryptJob): Add member functions setSigners, signers, setRecipients, recipients, setInputFile, inputFile, setOutputFile, outputFile, setEncryptionFlags, encryptionFlags. * lang/qt/src/signencryptjob_p.h (SignEncryptJobPrivate): Add members m_signers, m_recipients, m_inputFilePath, m_outputFilePath, m_encryptionFlags. * lang/qt/src/signjob.cpp: New. * lang/qt/src/signjob.h (SignJob): Add member functions setSigners, signers, setInputFile, inputFile, setOutputFile, outputFile, setSigningFlags, signingFlags. * lang/qt/src/signjob_p.h: New. * lang/qt/tests/Makefile.am: Add new test programs. * lang/qt/tests/run-encryptjob.cpp: New. * lang/qt/tests/run-signjob.cpp: New. -- This makes it possible to tell gpg to read the input and write the output directly to a specified file bypassing GpgME's Data IO when signing and/or encrypting a file. GnuPG-bug-id: 6550
* qt: Remove dead codeIngo Klöcker2023-12-213-30/+0
| | | | | | | | | * lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp: Remove long commented out showErrorDialog member function definitions. -- Displaying error messages is delegated to the job users since ages.
* qt: Replace Q_FOREACH with range-forIngo Klöcker2023-12-136-33/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmekeyformailboxjob.cpp (do_work): Replace Q_FOREACH with range-for. * lang/qt/src/qgpgmekeylistjob.cpp (QGpgMEKeyListJob::resultHook): Ditto. * lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Ditto. * lang/qt/tests/t-keylist.cpp (KeyListTest::testPubkeyAlgoAsString): Ditto. * lang/qt/tests/t-keylocate.cpp (KeyLocateTest::testDaneKeyLocate, KeyLocateTest::testKeyLocateSingle): Ditto. * lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt): Replace Q_FOREACH with range-for. Add braces around single statement blocks. * lang/qt/src/qgpgmesignjob.cpp (sign): Ditto. * lang/qt/src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfig::reloadConfiguration, QGpgMENewCryptoConfig::sync, QGpgMENewCryptoConfigComponent::setComponent, QGpgMENewCryptoConfigEntry::urlValueList, QGpgMENewCryptoConfigEntry::setURLValueList): Replace Q_FOREACH with range-for. Fix indentation. Add braces around single statement blocks. -- Where necessary the iterated object is wrapped with qAsConst to avoid deep copies of the iterated object.
* qt: Replace Q_NULLPTR with nullptrIngo Klöcker2023-12-134-5/+5
| | | | | | | * lang/qt/src/defaultkeygenerationjob.h, lang/qt/src/qgpgmebackend.h, lang/qt/src/quickjob.h, lang/qt/src/threadedjobmixin.h: Replace all occurrences of Q_NULLPTR with nullptr. --
* qt: Start dirmngr with gpgconf to avoid multiple instancesIngo Klöcker2023-11-231-7/+7
| | | | | | | | | | | * lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Use "gpgconf --launch dirmngr" to start dirmngr. -- Using gpgconf to start dirmngr prevents multiple instances to be started by the concurrently running keyserver lookup and WKD lookup. GnuPG-bug-id: 6833
* qt: On Windows, use UTF-8 when logging the error textIngo Klöcker2023-11-151-1/+7
| | | | | | | | * lang/qt/src/debug.cpp (operator<<): On Windows, interpret the error text as UTF-8 instead of local 8-bit encoding. -- GnuPG-bug-id: 5960
* qt: Remove left-over partial files more persistentlyIngo Klöcker2023-11-155-14/+164
| | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/cleaner.cpp, lang/qt/src/cleaner.h: New. * lang/qt/src/util.cpp (PartialFileGuard::~PartialFileGuard): Call Cleaner::removeFile instead of removeFile. * lang/qt/src/util.cpp, lang/qt/src/util.h (removeFile): Remove. -- If the initial attempt to remove the file fails then a Cleaner is created that tries to remove the file at regular intervals (10 s) and on destruction (which happens on application shutdown). GnuPG-bug-id: 6584
* qt: Deprecate DefaultKeyGenerationJobIngo Klöcker2023-11-101-1/+3
| | | | | | | | | | | | | * lang/qt/src/defaultkeygenerationjob.h (class DefaultKeyGenerationJob): Deprecate. -- GnuPG generates Ed25519 keys by default and has switched to 3072 bits as default for RSA keys. DefaultKeyGenerationJob always generates RSA 2048 keys and uses the old parameter file API of GnuPG. It shouldn't be used anymore. GnuPG-bug-id: 6805
* qt: Use temporary .part file names when creating archivesIngo Klöcker2023-10-275-15/+160
| | | | | | | | | | | | | | | | | | | * lang/qt/src/util.h, lang/qt/src/util.cpp (class PartialFileGuard): New. * lang/qt/src/util.cpp (getRandomCharacters, createPartFileName): New. * lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt_to_filename): Use PartialFileGuard. * lang/qt/src/qgpgmesignarchivejob.cpp (sign_to_filename): Ditto. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt_to_filename): Ditto. -- When creating signed and/or encrypted archives, gpgtar now writes the result to a temporary file name. On success, the archive is renamed to the final file name. Otherwise, the (partially written) temporary file is removed (if possible). GnuPG-bug-id: 6721
* qt: Refactor removal of output file on cancel or errorIngo Klöcker2023-10-275-54/+54
| | | | | | | | | | | | | | | | * lang/qt/src/util.h, lang/qt/src/util.cpp (removeFile): New. * lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt): Move removal of output file from here (encrypt_to_filename): ... to here and use new function. * lang/qt/src/qgpgmesignarchivejob.cpp (sign): Move removal of output file from here (sign_to_filename): ... to here and use new function. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt): Move removal of output file from here (sign_encrypt_to_filename): ... to here and use new function. -- GnuPG-bug-id: 6721
* qt: Handle cancel in changeexpiryjobAndre Heinecke2023-10-181-1/+1
| | | | | | | | | * lang/qt/src/qgpgmechangeexpiryjob.cpp (change_expiry): Return cancel error. -- The classical "cancel is not an error" problem. GnuPG-Bug-Id: T6754
* qt: Use UTF-8 for file names on WindowsIngo Klöcker2023-09-224-0/+28
| | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (decrypt_verify_from_file_name): On Windows, convert Unicode file name to UTF-8. * lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt, encrypt_to_filename): On Windows, convert Unicode file name from/to UTF-8. * lang/qt/src/qgpgmesignarchivejob.cpp (sign, sign_to_filename): Ditto. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt, sign_encrypt_to_filename): Ditto. -- On Windows, GnuPG expects file names to be UTF-8-encoded. This fixes encrypting and decrypting folders with umlauts in the folder name and in the file name of the archive. Encrypting and decrypting folders with kanji still fails. GnuPG-bug-id: 6728
* qt: Allow specifying user IDs to use when refreshing keys via WKDIngo Klöcker2023-08-234-17/+46
| | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/wkdrefreshjob.h, lang/qt/src/wkdrefreshjob.cpp (WKDRefreshJob::start): New overload. * lang/qt/src/wkdrefreshjob_p.h (WKDRefreshJobPrivate): Add field m_userIds. * lang/qt/src/qgpgmewkdrefreshjob.cpp (toEmailAddresses): New. (locate_external_keys): Change return type and arguments. (refresh_keys): Remove. (QGpgMEWKDRefreshJobPrivate::startIt): Get emails from keys or user IDs. Remove duplicates. Call locate_external_keys instead of refresh_keys. * lang/qt/tests/run-wkdrefreshjob.cpp (CommandLineOptions, parseCommandLine): New. (main): Support new option --all-userids. -- The new start() overload allows to specify the user IDs to use for the WKD lookup explicitly. This allows updating user IDs via WKD which were originally not retrieved via WKD. GnuPG-bug-id: 6672
* qt: Add job for refreshing OpenPGP keys via WKDIngo Klöcker2023-08-218-2/+415
| | | | | | | | | | | | | | | | | | | | | * lang/qt/src/wkdrefreshjob.cpp, lang/qt/src/wkdrefreshjob.h, lang/qt/src/wkdrefreshjob_p.h, lang/qt/src/qgpgmewkdrefreshjob.cpp, lang/qt/src/qgpgmewkdrefreshjob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function wkdRefreshJob * lang/qt/src/protocol_p.h (Protocol::wkdRefreshJob): ... and implement it. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-wkdrefreshjob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- This job allows updating keys via WKD. Only user IDs that were originally retrieved via WKD (i.e. which have origin WKD) are considered. GnuPG-bug-id: 6672
* qt: Clean up after failure or cancel of sign/encrypt archive operationIngo Klöcker2023-08-163-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt): Remove output file if operation was canceled or failed. * lang/qt/src/qgpgmesignarchivejob.cpp (sign): Ditto. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt): Ditto. * lang/qt/tests/run-encryptarchivejob.cpp (CommandLineOptions): Add field cancelTimeout. (parseCommandLine): Add option --cancel-after. Parse option value. (main): Check for invalid cancel timeout. Start timer for canceling the job. * lang/qt/tests/run-signarchivejob.cpp (CommandLineOptions): Add field cancelTimeout. (parseCommandLine): Add option --cancel-after. Parse option value. (main): Check for invalid cancel timeout. Start timer for canceling the job. -- This change ensures that the output file is removed if the creation of a signed or encrypted archive was canceled or failed. The new option of the test runners enables testing the cancelation of the jobs. GnuPG-bug-id: 6584