Commit 787568c7 authored by Ingo Klöcker's avatar Ingo Klöcker

Make it compile with libgpg-error < 1.36

GnuPG-bug-id: 4794
parent 023dad1f
Pipeline #42296 passed with stage
in 13 minutes and 2 seconds
......@@ -20,6 +20,11 @@
#include <gpgme++/error.h>
#include <gpg-error.h>
#if GPG_ERROR_VERSION_NUMBER >= 0x12400 // 1.36
# define GPG_ERROR_HAS_BAD_AUTH
#endif
#include "kleopatra_debug.h"
using namespace Kleo;
......@@ -136,10 +141,12 @@ void AuthenticatePIVCardApplicationCommand::Private::slotResult(const Error &err
return;
}
if (err) {
#ifdef GPG_ERROR_HAS_BAD_AUTH
if (err.code() == GPG_ERR_BAD_AUTH) {
retryAskingForKey();
return;
}
#endif
error(i18nc("@info", "Authenticating to the card failed: %1", QString::fromLatin1(err.asString())),
i18nc("@title", "Error"));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment