From f6d020e24fb64cfba5e80cef7f80cad15f08cc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 4 Jul 2024 18:19:56 +0200 Subject: qt: Replace usage of deprecated Error::asString * 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 --- lang/qt/src/qgpgmewkdlookupjob.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lang/qt/src/qgpgmewkdlookupjob.cpp') diff --git a/lang/qt/src/qgpgmewkdlookupjob.cpp b/lang/qt/src/qgpgmewkdlookupjob.cpp index 25f0a2bf..76f5b728 100644 --- a/lang/qt/src/qgpgmewkdlookupjob.cpp +++ b/lang/qt/src/qgpgmewkdlookupjob.cpp @@ -37,6 +37,7 @@ #include "qgpgmewkdlookupjob.h" +#include "debug.h" #include "qgpgme_debug.h" #include @@ -62,7 +63,7 @@ static GpgME::Error startDirmngr(Context *assuanCtx) auto spawnCtx = std::unique_ptr{Context::createForEngine(SpawnEngine, &err)}; if (err) { - qCDebug(QGPGME_LOG) << "Error: Failed to get context for spawn engine (" << err.asString() << ")"; + qCDebug(QGPGME_LOG) << "Error: Failed to get context for spawn engine (" << err << ")"; } const auto gpgconfProgram = GpgME::dirInfo("gpgconf-name"); // replace backslashes with forward slashes in homedir to work around bug T6833 @@ -132,11 +133,11 @@ static GpgME::Error run_wkd_get(Context *ctx, const std::string &email) // no key for email is available via WKD or that the domain doesn't // support WKD or that the domain doesn't exist (on subsequent requests // using dirmngr's internal cache) - qCDebug(QGPGME_LOG) << "WKD_GET returned" << err.asString() << "; ignoring..."; + qCDebug(QGPGME_LOG) << "WKD_GET returned" << err << "; ignoring..."; err = {}; } if (err) { - qCDebug(QGPGME_LOG) << "WKD_GET failed with" << err.asString(); + qCDebug(QGPGME_LOG) << "WKD_GET failed with" << err; } return err; -- cgit v1.2.3