qt: Handle diagnostic audit log for CMS
authorAndre Heinecke <aheinecke@gnupg.org>
Wed, 20 Mar 2019 08:56:38 +0000 (09:56 +0100)
committerAndre Heinecke <aheinecke@gnupg.org>
Wed, 20 Mar 2019 08:56:38 +0000 (09:56 +0100)
* lang/qt/src/threadedjobmixin.cpp(_detail::audit_log_as_html):
Handle CMS audit log.

lang/qt/src/threadedjobmixin.cpp

index d5399f7..3302918 100644 (file)
@@ -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();