Commit 3e2c40e4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

libkleo depends against 1.11.1

parent 0735b293
Pipeline #26065 passed with stage
in 12 minutes and 24 seconds
......@@ -17,7 +17,7 @@ set(KF5_MIN_VERSION "5.71.0")
set(KMIME_VERSION "5.14.40")
set(LIBKLEO_VERSION "5.14.40")
set(QT_REQUIRED_VERSION "5.13.0")
set(GPGME_REQUIRED_VERSION "1.8.0")
set(GPGME_REQUIRED_VERSION "1.11.1")
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
......
......@@ -37,19 +37,12 @@
#include <gpgme++/key.h>
/* Support compilation with GPGME older than 1.9. */
#include <gpgme++/gpgmepp_version.h>
#if GPGMEPP_VERSION > 0x10900
# define GPGME_HAS_KEY_IS_DEVS
#endif
/* Does the given object comply with DE_VS? This macro can be used to
ensure that we can still build against older versions of GPGME
without cluttering the code with preprocessor conditionals. */
#ifdef GPGME_HAS_KEY_IS_DEVS
# define IS_DE_VS(x) (x).isDeVs()
#else
# define IS_DE_VS(x) false
#endif
class QString;
class QStringList;
......
......@@ -64,17 +64,12 @@
#include <QGpgME/DataProvider>
#if GPGMEPP_VERSION > 0x10801 // 1.8.1
// TODO remove ifdef once > 1.8.1 is required
#include <gpgme++/gpggencardkeyinteractor.h>
# define GPGME_CAN_GENCARDKEY
#endif
using namespace Kleo;
using namespace Kleo::SmartCard;
namespace {
#ifdef GPGME_CAN_GENCARDKEY
class GenKeyThread: public QThread
{
Q_OBJECT
......@@ -118,7 +113,6 @@ class GenKeyThread: public QThread
std::string mBkpFile;
};
#endif
} // Namespace
PGPCardWidget::PGPCardWidget(QWidget *parent):
......@@ -205,12 +199,10 @@ PGPCardWidget::PGPCardWidget(QWidget *parent):
auto actionLayout = new QHBoxLayout;
#ifdef GPGME_CAN_GENCARDKEY
auto generateButton = new QPushButton(i18n("Generate new Keys"));
generateButton->setToolTip(i18n("Create a new primary key and generate subkeys on the card."));
actionLayout->addWidget(generateButton);
connect(generateButton, &QPushButton::clicked, this, &PGPCardWidget::genkeyRequested);
#endif
auto pinButtton = new QPushButton(i18n("Change PIN"));
pinButtton->setToolTip(i18n("Change the PIN required to unblock the smartcard."));
......@@ -266,7 +258,6 @@ void PGPCardWidget::doChangePin(int slot)
this, "changePinResult");
}
#ifdef GPGME_CAN_GENCARDKEY
void PGPCardWidget::doGenKey(GenCardKeyDialog *dlg)
{
const auto params = dlg->getKeyParams();
......@@ -321,10 +312,6 @@ void PGPCardWidget::genKeyDone(const GpgME::Error &err, const std::string &backu
"Successfully generated a new key for this card."),
i18nc("@title", "Success"));
}
#else
void PGPCardWidget::doGenKey(GenCardKeyDialog *) {}
void PGPCardWidget::genKeyDone(const GpgME::Error &, const std::string &) {}
#endif
void PGPCardWidget::genkeyRequested()
{
......
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