Commit e31690ff authored by Laurent Montel's avatar Laurent Montel 😁

Revert it as in CI we can't build it.

(cherry picked from commit f4a62c48)
parent 33b5bc70
......@@ -52,7 +52,10 @@ find_package(KF5Contacts ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIMELIB_VERSION} CONFIG REQUIRED)
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG)
if (NOT WIN32)
set_package_properties(KF5Libkleo PROPERTIES TYPE REQUIRED)
endif()
find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
find_package(Grantlee5 ${GRANTLEE_LIB_VERSION} CONFIG REQUIRED)
......
......@@ -39,6 +39,9 @@ set(akonadicontact_actions_SRCS
actions/qekigadialer.cpp
)
if (TARGET KF5::Libkleo)
set(HAVE_KLEO TRUE)
endif()
configure_file(config-akonadi-contact.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-akonadi-contact.h)
configure_file( actions/contactactionssettings.kcfg.cmake ${CMAKE_CURRENT_BINARY_DIR}/contactactionssettings.kcfg @ONLY)
......@@ -159,10 +162,12 @@ target_link_libraries(KF5AkonadiContact
Grantlee5::Templates
)
if(TARGET KF5::Libkleo)
target_link_libraries(KF5AkonadiContact
PRIVATE
KF5::Libkleo
)
endif()
set_target_properties(KF5AkonadiContact PROPERTIES
VERSION ${AKONADICONTACT_VERSION_STRING}
......
#define AKONADI_CONTACT_LIB "${KDE_INSTALL_FULL_LIBDIR}"
#cmakedefine HAVE_KLEO
......@@ -6,7 +6,9 @@
#include "config-akonadi-contact.h"
#include "contactgrantleewrapper.h"
#ifdef HAVE_KLEO
#include <Libkleo/Enum>
#endif
#include <KLocalizedString>
#include <QBuffer>
......@@ -76,12 +78,20 @@ int ContactGrantleeWrapper::age() const
QString ContactGrantleeWrapper::cryptoPreference() const
{
#ifdef HAVE_KLEO
return Kleo::encryptionPreferenceToLabel(Kleo::stringToEncryptionPreference(custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("CRYPTOENCRYPTPREF"))));
#else
return custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("CRYPTOENCRYPTPREF"));
#endif
}
QString ContactGrantleeWrapper::signaturePreference() const
{
#ifdef HAVE_KLEO
return Kleo::signingPreferenceToLabel(Kleo::stringToSigningPreference(custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("CRYPTOSIGNPREF"))));
#else
return custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("CRYPTOSIGNPREF"));
#endif
}
static QString imgToDataUrl(const QImage &image)
......
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