Verified Commit 6fc29c01 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Add missing feature check in details widget

GpgME::UserID::remarks is not available in the minimal
GPGME version we require.
parent fa78de94
......@@ -51,6 +51,11 @@
#include <KConfigGroup>
#include <KSharedConfig>
#include <gpgme++/gpgmepp_version.h>
#if GPGMEPP_VERSION >= 0x10E00 // 1.14.0
# define GPGME_HAS_REMARKS
#endif
#define HIDE_ROW(row) \
ui.row->setVisible(false); \
ui.row##Lbl->setVisible(false);
......@@ -206,9 +211,11 @@ void CertificateDetailsWidget::Private::setupCommonProperties()
GpgME::Error err;
QStringList remarkList;
#ifdef GPGME_HAS_REMARKS
for (const auto &rem: uid.remarks(Remarks::remarkKeys(), err)) {
remarkList << QString::fromStdString(rem);
}
#endif
const auto remark = remarkList.join(QStringLiteral("; "));
item->setData(3, Qt::DisplayRole, remark);
item->setData(3, Qt::ToolTipRole, toolTip);
......
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