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/debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lang/qt/src/debug.cpp') diff --git a/lang/qt/src/debug.cpp b/lang/qt/src/debug.cpp index 03244dc6..acde9d42 100644 --- a/lang/qt/src/debug.cpp +++ b/lang/qt/src/debug.cpp @@ -44,9 +44,9 @@ QDebug operator<<(QDebug debug, const GpgME::Error &err) { #ifdef Q_OS_WIN // On Windows, we tell libgpg-error to return (translated) error messages as UTF-8 - const auto errAsString = QString::fromUtf8(err.asString()); + const auto errAsString = QString::fromStdString(err.asStdString()); #else - const auto errAsString = QString::fromLocal8Bit(err.asString()); + const auto errAsString = QString::fromLocal8Bit(err.asStdString().c_str()); #endif const bool oldSetting = debug.autoInsertSpaces(); debug.nospace() << errAsString << " (code: " << err.code() << ", source: " << err.source() << ")"; -- cgit v1.2.3