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/tests/t-various.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lang/qt/tests/t-various.cpp') diff --git a/lang/qt/tests/t-various.cpp b/lang/qt/tests/t-various.cpp index 6759f3b6..282fffc2 100644 --- a/lang/qt/tests/t-various.cpp +++ b/lang/qt/tests/t-various.cpp @@ -40,6 +40,7 @@ #include #include "keylistjob.h" #include "protocol.h" +#include "util.h" #include #include #include @@ -265,9 +266,9 @@ private Q_SLOTS: if (err2) { if (err2.code() == GPG_ERR_GENERAL) { QFAIL(qPrintable(QString("The SignKeyJob failed with '%1'.\n" - "Hint: Run with GPGMEPP_INTERACTOR_DEBUG=stderr to debug the edit interaction.").arg(err2.asString()))); + "Hint: Run with GPGMEPP_INTERACTOR_DEBUG=stderr to debug the edit interaction.").arg(errorAsString(err2)))); } else { - QFAIL(qPrintable(QString("The SignKeyJob failed with '%1'.").arg(err2.asString()))); + QFAIL(qPrintable(QString("The SignKeyJob failed with '%1'.").arg(errorAsString(err2)))); } } }); @@ -321,9 +322,9 @@ private Q_SLOTS: if (err2) { if (err2.code() == GPG_ERR_GENERAL) { QFAIL(qPrintable(QString("The SignKeyJob failed with '%1'.\n" - "Hint: Run with GPGMEPP_INTERACTOR_DEBUG=stderr to debug the edit interaction.").arg(err2.asString()))); + "Hint: Run with GPGMEPP_INTERACTOR_DEBUG=stderr to debug the edit interaction.").arg(errorAsString(err2)))); } else { - QFAIL(qPrintable(QString("The SignKeyJob failed with '%1'.").arg(err2.asString()))); + QFAIL(qPrintable(QString("The SignKeyJob failed with '%1'.").arg(errorAsString(err2)))); } } }); -- cgit v1.2.3