From 47369569e23482bdd24a136b071192352b1d1347 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Wed, 20 Mar 2019 09:56:38 +0100 Subject: [PATCH] qt: Handle diagnostic audit log for CMS * lang/qt/src/threadedjobmixin.cpp(_detail::audit_log_as_html): Handle CMS audit log. --- lang/qt/src/threadedjobmixin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lang/qt/src/threadedjobmixin.cpp b/lang/qt/src/threadedjobmixin.cpp index d5399f7b..3302918b 100644 --- a/lang/qt/src/threadedjobmixin.cpp +++ b/lang/qt/src/threadedjobmixin.cpp @@ -132,7 +132,13 @@ QString _detail::audit_log_as_html(Context *ctx, GpgME::Error &err) } if (ctx->protocol() == CMS) { - if ((err = ctx->lastError()) || (err = ctx->getAuditLog(data, CMSAuditLogFlags))) { + if ((err = ctx->lastError())) { + if ((err = ctx->getAuditLog(data, Context::DiagnosticAuditLog))) { + return QString::fromLocal8Bit(err.asString()); + } + const QByteArray ba = dp.data(); + return markupDiagnostics(stringFromGpgOutput(ba)); + } else if ((err = ctx->getAuditLog(data, CMSAuditLogFlags))) { return QString::fromLocal8Bit(err.asString()); } const QByteArray ba = dp.data();