aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/tests
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2024-07-04 16:19:56 +0000
committerIngo Klöcker <[email protected]>2024-07-05 08:05:51 +0000
commitf6d020e24fb64cfba5e80cef7f80cad15f08cc3c (patch)
treef4b268730526013c6175cbe8d3cc0523fedb448c /lang/qt/tests
parentcpp: Deprecate Error::asString and update users (diff)
downloadgpgme-f6d020e24fb64cfba5e80cef7f80cad15f08cc3c.tar.gz
gpgme-f6d020e24fb64cfba5e80cef7f80cad15f08cc3c.zip
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
Diffstat (limited to 'lang/qt/tests')
-rw-r--r--lang/qt/tests/run-decryptverifyarchivejob.cpp3
-rw-r--r--lang/qt/tests/run-decryptverifyjob.cpp3
-rw-r--r--lang/qt/tests/run-encryptarchivejob.cpp5
-rw-r--r--lang/qt/tests/run-encryptjob.cpp5
-rw-r--r--lang/qt/tests/run-exportjob.cpp3
-rw-r--r--lang/qt/tests/run-importjob.cpp2
-rw-r--r--lang/qt/tests/run-receivekeysjob.cpp3
-rw-r--r--lang/qt/tests/run-refreshkeysjob.cpp11
-rw-r--r--lang/qt/tests/run-signarchivejob.cpp3
-rw-r--r--lang/qt/tests/run-signjob.cpp3
-rw-r--r--lang/qt/tests/run-verifydetachedjob.cpp3
-rw-r--r--lang/qt/tests/run-verifyopaquejob.cpp3
-rw-r--r--lang/qt/tests/run-wkdrefreshjob.cpp5
-rw-r--r--lang/qt/tests/t-changeexpiryjob.cpp11
-rw-r--r--lang/qt/tests/t-ownertrust.cpp3
-rw-r--r--lang/qt/tests/t-remarks.cpp3
-rw-r--r--lang/qt/tests/t-tofuinfo.cpp3
-rw-r--r--lang/qt/tests/t-trustsignatures.cpp33
-rw-r--r--lang/qt/tests/t-various.cpp9
19 files changed, 66 insertions, 48 deletions
diff --git a/lang/qt/tests/run-decryptverifyarchivejob.cpp b/lang/qt/tests/run-decryptverifyarchivejob.cpp
index 38cf6b86..36d023ec 100644
--- a/lang/qt/tests/run-decryptverifyarchivejob.cpp
+++ b/lang/qt/tests/run-decryptverifyarchivejob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <decryptverifyarchivejob.h>
#include <protocol.h>
@@ -114,7 +115,7 @@ int main(int argc, char **argv)
const auto err = job->startIt();
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
diff --git a/lang/qt/tests/run-decryptverifyjob.cpp b/lang/qt/tests/run-decryptverifyjob.cpp
index 4d2e947c..da8ec9fe 100644
--- a/lang/qt/tests/run-decryptverifyjob.cpp
+++ b/lang/qt/tests/run-decryptverifyjob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <decryptverifyjob.h>
@@ -155,7 +156,7 @@ int main(int argc, char **argv)
err = job->startIt();
}
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
diff --git a/lang/qt/tests/run-encryptarchivejob.cpp b/lang/qt/tests/run-encryptarchivejob.cpp
index 2d9c09a3..87781fd9 100644
--- a/lang/qt/tests/run-encryptarchivejob.cpp
+++ b/lang/qt/tests/run-encryptarchivejob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <encryptarchivejob.h>
#include <signencryptarchivejob.h>
@@ -176,7 +177,7 @@ int main(int argc, char **argv)
err = job->startIt();
}
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
} else {
@@ -207,7 +208,7 @@ int main(int argc, char **argv)
err = job->startIt();
}
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
}
diff --git a/lang/qt/tests/run-encryptjob.cpp b/lang/qt/tests/run-encryptjob.cpp
index 47e6e248..14c8ea44 100644
--- a/lang/qt/tests/run-encryptjob.cpp
+++ b/lang/qt/tests/run-encryptjob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <encryptjob.h>
#include <signencryptjob.h>
@@ -157,7 +158,7 @@ int main(int argc, char **argv)
err = job->startIt();
}
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
} else {
@@ -189,7 +190,7 @@ int main(int argc, char **argv)
err = job->startIt();
}
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
}
diff --git a/lang/qt/tests/run-exportjob.cpp b/lang/qt/tests/run-exportjob.cpp
index 6cb43c22..ed6f8912 100644
--- a/lang/qt/tests/run-exportjob.cpp
+++ b/lang/qt/tests/run-exportjob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <exportjob.h>
#include <protocol.h>
@@ -106,7 +107,7 @@ int main(int argc, char *argv[])
QObject::connect(job, &QGpgME::ExportJob::result,
&app, [&app] (const GpgME::Error &err, const QByteArray &keyData, const QString &, const GpgME::Error &) {
if (err) {
- cerr << "The ChangeExpiryJob failed with" << err.asString() << ".";
+ cerr << "The ChangeExpiryJob failed with" << err << ".";
app.exit(1);
return;
}
diff --git a/lang/qt/tests/run-importjob.cpp b/lang/qt/tests/run-importjob.cpp
index a0b9ffc1..67ee73f3 100644
--- a/lang/qt/tests/run-importjob.cpp
+++ b/lang/qt/tests/run-importjob.cpp
@@ -89,7 +89,7 @@ int main(int argc, char **argv)
const auto keyData = f.readAll();
auto job = (protocol == GpgME::CMS ? QGpgME::smime() : QGpgME::openpgp())->importJob();
const auto result = job->exec(keyData);
- qDebug() << "Result error:" << result.error().asString();
+ qDebug() << "Result error:" << result.error();
for (const auto &line : QString::fromStdString(QGpgME::toLogString(result)).split('\n')) {
qDebug().noquote() << line;
}
diff --git a/lang/qt/tests/run-receivekeysjob.cpp b/lang/qt/tests/run-receivekeysjob.cpp
index 6bfe047f..44553218 100644
--- a/lang/qt/tests/run-receivekeysjob.cpp
+++ b/lang/qt/tests/run-receivekeysjob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <gpgme++/importresult.h>
#include <protocol.h>
#include <receivekeysjob.h>
@@ -58,7 +59,7 @@ int main(int argc, char **argv)
auto job = QGpgME::openpgp()->receiveKeysJob();
const auto result = job->exec(keyIds);
- std::cout << "Result: " << result.error().asString() << std::endl;
+ std::cout << "Result: " << result.error() << std::endl;
std::cout << "Details:\n" << result << std::endl;
return 0;
diff --git a/lang/qt/tests/run-refreshkeysjob.cpp b/lang/qt/tests/run-refreshkeysjob.cpp
index e2bf7d1f..ad653a54 100644
--- a/lang/qt/tests/run-refreshkeysjob.cpp
+++ b/lang/qt/tests/run-refreshkeysjob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <refreshkeysjob.h>
#include <receivekeysjob.h>
@@ -111,10 +112,10 @@ int main(int argc, char **argv)
return 1;
}
if (openPGPKey.error) {
- std::cerr << "Warning: Error while getting OpenPGP key: " << openPGPKey.error.asString() << std::endl;
+ std::cerr << "Warning: Error while getting OpenPGP key: " << openPGPKey.error << std::endl;
}
if (smimeKey.error) {
- std::cerr << "Warning: Error while getting S/MIME key: " << openPGPKey.error.asString() << std::endl;
+ std::cerr << "Warning: Error while getting S/MIME key: " << openPGPKey.error << std::endl;
}
auto key = openPGPKey.key.isNull() ? smimeKey.key : openPGPKey.key;
std::cout << "Refreshing " << displayName(key.protocol()) << " key " << key.userID(0).id() << std::endl;
@@ -131,7 +132,7 @@ int main(int argc, char **argv)
});
const auto err = job->start({QString::fromLatin1(key.primaryFingerprint())});
if (err) {
- std::cerr << "Error: " << err.asString() << std::endl;
+ std::cerr << "Error: " << err << std::endl;
return 1;
}
} else {
@@ -141,12 +142,12 @@ int main(int argc, char **argv)
return 1;
}
QObject::connect(job, &QGpgME::RefreshKeysJob::result, &app, [](const GpgME::Error &err) {
- std::cout << "Result: " << err.asString() << std::endl;
+ std::cout << "Result: " << err << std::endl;
qApp->quit();
});
const auto err = job->start({key});
if (err) {
- std::cerr << "Error: " << err.asString() << std::endl;
+ std::cerr << "Error: " << err << std::endl;
return 1;
}
}
diff --git a/lang/qt/tests/run-signarchivejob.cpp b/lang/qt/tests/run-signarchivejob.cpp
index c832372a..3152507e 100644
--- a/lang/qt/tests/run-signarchivejob.cpp
+++ b/lang/qt/tests/run-signarchivejob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <signarchivejob.h>
@@ -168,7 +169,7 @@ int main(int argc, char **argv)
err = job->startIt();
}
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
diff --git a/lang/qt/tests/run-signjob.cpp b/lang/qt/tests/run-signjob.cpp
index a85c6034..9c2ebcc2 100644
--- a/lang/qt/tests/run-signjob.cpp
+++ b/lang/qt/tests/run-signjob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <signjob.h>
@@ -159,7 +160,7 @@ int main(int argc, char **argv)
err = job->startIt();
}
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
diff --git a/lang/qt/tests/run-verifydetachedjob.cpp b/lang/qt/tests/run-verifydetachedjob.cpp
index 65274383..60ba5470 100644
--- a/lang/qt/tests/run-verifydetachedjob.cpp
+++ b/lang/qt/tests/run-verifydetachedjob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <verifydetachedjob.h>
@@ -113,7 +114,7 @@ int main(int argc, char **argv)
job->setSignedFile(options.signedFile);
err = job->startIt();
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
diff --git a/lang/qt/tests/run-verifyopaquejob.cpp b/lang/qt/tests/run-verifyopaquejob.cpp
index 080c988c..09578430 100644
--- a/lang/qt/tests/run-verifyopaquejob.cpp
+++ b/lang/qt/tests/run-verifyopaquejob.cpp
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <verifyopaquejob.h>
@@ -152,7 +153,7 @@ int main(int argc, char **argv)
err = job->startIt();
}
if (err) {
- std::cerr << "Error: Starting the job failed: " << err.asString() << std::endl;
+ std::cerr << "Error: Starting the job failed: " << err << std::endl;
return 1;
}
diff --git a/lang/qt/tests/run-wkdrefreshjob.cpp b/lang/qt/tests/run-wkdrefreshjob.cpp
index 85110b0d..17bad83d 100644
--- a/lang/qt/tests/run-wkdrefreshjob.cpp
+++ b/lang/qt/tests/run-wkdrefreshjob.cpp
@@ -35,6 +35,7 @@
#include "config.h"
#endif
+#include <debug.h>
#include <protocol.h>
#include <wkdrefreshjob.h>
@@ -121,7 +122,7 @@ int main(int argc, char **argv)
return 1;
}
if (err) {
- std::cerr << "Error while getting OpenPGP key: " << err.asString() << std::endl;
+ std::cerr << "Error while getting OpenPGP key: " << err << std::endl;
return 1;
}
std::cout << "Refreshing OpenPGP key " << key.userID(0).id() << std::endl;
@@ -145,7 +146,7 @@ int main(int argc, char **argv)
err = job->start({key});
}
if (err) {
- std::cerr << "Error: " << err.asString() << std::endl;
+ std::cerr << "Error: " << err << std::endl;
return 1;
}
diff --git a/lang/qt/tests/t-changeexpiryjob.cpp b/lang/qt/tests/t-changeexpiryjob.cpp
index 54a54aeb..b64bf798 100644
--- a/lang/qt/tests/t-changeexpiryjob.cpp
+++ b/lang/qt/tests/t-changeexpiryjob.cpp
@@ -40,6 +40,7 @@
#include <gpgme++/context.h>
#include <gpgme++/engineinfo.h>
#include "protocol.h"
+#include "util.h"
#include <QSignalSpy>
#include <QTemporaryDir>
@@ -84,7 +85,7 @@ private Q_SLOTS:
this, [this] (const GpgME::Error &err2, const QString &, const GpgME::Error &) {
Q_EMIT asyncDone();
if (err2) {
- QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(err2.asString())));
+ QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(errorAsString(err2))));
}
});
@@ -147,7 +148,7 @@ private Q_SLOTS:
this, [this] (const GpgME::Error &err2, const QString &, const GpgME::Error &) {
Q_EMIT asyncDone();
if (err2) {
- QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(err2.asString())));
+ QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(errorAsString(err2))));
}
});
@@ -211,7 +212,7 @@ private Q_SLOTS:
this, [this] (const GpgME::Error &err2, const QString &, const GpgME::Error &) {
Q_EMIT asyncDone();
if (err2) {
- QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(err2.asString())));
+ QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(errorAsString(err2))));
}
});
@@ -274,7 +275,7 @@ private Q_SLOTS:
this, [this] (const GpgME::Error &err2, const QString &, const GpgME::Error &) {
Q_EMIT asyncDone();
if (err2) {
- QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(err2.asString())));
+ QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(errorAsString(err2))));
}
});
@@ -342,7 +343,7 @@ private Q_SLOTS:
this, [this] (const GpgME::Error &err2, const QString &, const GpgME::Error &) {
Q_EMIT asyncDone();
if (err2) {
- QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(err2.asString())));
+ QFAIL(qPrintable(QString("The ChangeExpiryJob failed with '%1'.").arg(errorAsString(err2))));
}
});
diff --git a/lang/qt/tests/t-ownertrust.cpp b/lang/qt/tests/t-ownertrust.cpp
index bb2df08a..653304e4 100644
--- a/lang/qt/tests/t-ownertrust.cpp
+++ b/lang/qt/tests/t-ownertrust.cpp
@@ -37,6 +37,7 @@
#include <QDebug>
#include <QTest>
#include <QSignalSpy>
+#include "debug.h"
#include "keylistjob.h"
#include "protocol.h"
#include <gpgme++/keylistresult.h>
@@ -69,7 +70,7 @@ private Q_SLOTS:
connect(job2, &ChangeOwnerTrustJob::result, this, [this](Error e)
{
if (e) {
- qDebug() << "Error in result: " << e.asString();
+ qDebug() << "Error in result: " << e;
}
QVERIFY(!e);
Q_EMIT asyncDone();
diff --git a/lang/qt/tests/t-remarks.cpp b/lang/qt/tests/t-remarks.cpp
index 86a5f6a5..b7de4ac4 100644
--- a/lang/qt/tests/t-remarks.cpp
+++ b/lang/qt/tests/t-remarks.cpp
@@ -39,6 +39,7 @@
#include <QTest>
#include <QSignalSpy>
#include <QTemporaryDir>
+#include "debug.h"
#include "keylistjob.h"
#include "protocol.h"
#include "signkeyjob.h"
@@ -90,7 +91,7 @@ public:
const GpgME::Error) {
Q_EMIT asyncDone();
if (err2) {
- qDebug() << "Error: " << err2.asString();
+ qDebug() << "Error: " << err2;
}
QVERIFY(err2);
});
diff --git a/lang/qt/tests/t-tofuinfo.cpp b/lang/qt/tests/t-tofuinfo.cpp
index b495ec5c..852142cf 100644
--- a/lang/qt/tests/t-tofuinfo.cpp
+++ b/lang/qt/tests/t-tofuinfo.cpp
@@ -38,6 +38,7 @@
#include <QTemporaryDir>
#include <QSignalSpy>
+#include "debug.h"
#include "protocol.h"
#include <gpgme++/tofuinfo.h>
#include "tofupolicyjob.h"
@@ -377,7 +378,7 @@ private Q_SLOTS:
if (keys.empty()) {
qDebug() << "[email protected] not found";
- qDebug() << "Error: " << result.error().asString();
+ qDebug() << "Error: " << result.error();
const auto homedir = QString::fromLocal8Bit(qgetenv("GNUPGHOME"));
qDebug() << "Homedir is: " << homedir;
QFileInfo fi(homedir + "/pubring.gpg");
diff --git a/lang/qt/tests/t-trustsignatures.cpp b/lang/qt/tests/t-trustsignatures.cpp
index 356b49b7..6d575dff 100644
--- a/lang/qt/tests/t-trustsignatures.cpp
+++ b/lang/qt/tests/t-trustsignatures.cpp
@@ -40,6 +40,7 @@
#include <gpgme++/engineinfo.h>
#include "protocol.h"
#include "signkeyjob.h"
+#include "util.h"
#include <QRegularExpression>
#include <QSignalSpy>
@@ -94,9 +95,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))));
}
}
});
@@ -138,9 +139,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))));
}
}
});
@@ -205,9 +206,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))));
}
}
});
@@ -249,9 +250,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))));
}
}
});
@@ -317,9 +318,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))));
}
}
});
@@ -361,9 +362,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))));
}
}
});
@@ -428,9 +429,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))));
}
}
});
@@ -473,9 +474,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))));
}
}
});
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 <QTemporaryDir>
#include "keylistjob.h"
#include "protocol.h"
+#include "util.h"
#include <gpgme++/keylistresult.h>
#include <gpgme++/context.h>
#include <gpgme++/engineinfo.h>
@@ -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))));
}
}
});