Commit 42f95c68 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Move kldap kcm here as it's runtime element

parent 3988eed5
Pipeline #23362 failed with stage
in 72 minutes and 20 seconds
......@@ -63,6 +63,9 @@ include(ECMInstallIcons)
include(ECMQtDeclareLoggingCategory)
include(GenerateExportHeader)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(QT_REQUIRED_VERSION "5.13.0")
......@@ -87,6 +90,7 @@ set(AKONADINOTE_LIB_VERSION "5.14.40")
set(PIMCOMMON_LIB_VERSION "5.14.40")
set(KGAPI_LIB_VERSION "5.14.40")
set(LIBKDEPIM_LIB_VERSION_LIB "5.14.42")
set(KLDAP_LIB_VERSION "5.14.40")
set( SharedMimeInfo_MINIMUM_VERSION "1.3" )
find_package(SharedMimeInfo ${SharedMimeInfo_MINIMUM_VERSION} REQUIRED)
......@@ -112,6 +116,7 @@ find_package(KF5TextWidgets ${KF5_MIN_VERSION} CONFIG REQUIRED) # for KPluralHan
find_package(KF5Notifications ${KF5_MIN_VERSION} CONFIG REQUIRED) # pop3, ews
find_package(KF5DocTools ${KF5_MIN_VERSION} CONFIG REQUIRED) # pop3
find_package(KF5Holidays ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5KCMUtils ${KF5_MIN_VERSION} CONFIG REQUIRED)
# KdepimLibs package
find_package(KF5Akonadi ${AKONADI_VERSION} CONFIG REQUIRED)
......@@ -132,6 +137,7 @@ find_package(KF5AkonadiCalendar ${AKONADICALENDAR_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
find_package(KPimGAPI ${KGAPI_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5LibkdepimAkonadi ${LIBKDEPIM_LIB_VERSION_LIB} CONFIG REQUIRED)
find_package(KF5Ldap ${KLDAP_LIB_VERSION} CONFIG REQUIRED)
option(KDEPIM_RUN_ISOLATED_TESTS "Run the isolated tests." FALSE)
option(NO_REGENERATE_MIME "Don't regenerate mime file (developer-only option)" FALSE )
......@@ -150,6 +156,7 @@ add_subdirectory(agents)
add_subdirectory(defaultsetup)
add_subdirectory(kioslave)
add_subdirectory(migration)
add_subdirectory(kcms)
add_subdirectory(doc)
## install the MIME type spec file for KDEPIM specific MIME types
......
add_subdirectory(ldap)
add_definitions(-DTRANSLATION_DOMAIN=\"kcm_ldap\")
set( kcm_ldap_SRCS
kcmldap.cpp
)
add_library(kcm_ldap MODULE ${kcm_ldap_SRCS})
target_link_libraries(kcm_ldap KF5::KCMUtils KF5::I18n KF5::Ldap)
kcoreaddons_desktop_to_json(kcm_ldap kcmldap.desktop DEFAULT_SERVICE_TYPE)
install(TARGETS kcm_ldap DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES kcmldap.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
/*
This file is part of libkldap.
Copyright (c) 2002-2009 Tobias Koenig <tokoe@kde.org>
Copyright (C) 2013-2020 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "kcmldap_p.h"
#include <QVBoxLayout>
#include <KAboutData>
#include <KPluginFactory>
#include <KLocalizedString>
#include <KLDAP/LdapConfigureWidget>
K_PLUGIN_CLASS_WITH_JSON(KCMLdap, "kcmldap.json")
KCMLdap::KCMLdap(QWidget *parent, const QVariantList &)
: KCModule(parent)
{
setButtons(KCModule::Apply);
KAboutData *about = new KAboutData(QStringLiteral("kcmldap"),
i18n("kcmldap"),
QString(),
i18n("LDAP Server Settings"),
KAboutLicense::LGPL,
i18n("(c) 2009 - 2010 Tobias Koenig"));
about->addAuthor(i18n("Tobias Koenig"), QString(), QStringLiteral("tokoe@kde.org"));
setAboutData(about);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
mLdapConfigureWidget = new KLDAP::LdapConfigureWidget(this);
layout->addWidget(mLdapConfigureWidget);
connect(mLdapConfigureWidget, &KLDAP::LdapConfigureWidget::changed, this, qOverload<bool>(&KCMLdap::changed));
}
KCMLdap::~KCMLdap()
{
}
void KCMLdap::load()
{
mLdapConfigureWidget->load();
}
void KCMLdap::save()
{
mLdapConfigureWidget->save();
}
#include "kcmldap.moc"
[Desktop Entry]
Icon=kontact
Type=Service
X-KDE-ServiceTypes=KCModule
X-KDE-Library=kcm_ldap
X-KDE-ParentApp=kaddressbook
X-KDE-ParentComponents=kaddressbook,kontact_kaddressbookplugin
X-KDE-CfgDlgHierarchy=KAddressBook
X-KDE-Weight=200
Name=LDAP Server Settings
Name[ar]=إعدادات خادوم LDAP
Name[ca]=Arranjament del servidor LDAP
Name[ca@valencia]=Arranjament del servidor LDAP
Name[cs]=Nastavení serveru LDAP
Name[da]=Indstillinger for LDAP-server
Name[de]=LDAP-Server-Einstellungen
Name[en_GB]=LDAP Server Settings
Name[es]=Preferencias del servidor LDAP
Name[et]=LDAP serveri seadistused
Name[fi]=LDAP-palvelinasetukset
Name[fr]=Configuration du serveur LDAP
Name[gl]=Configuración do servidor de LDAP
Name[ia]=Preferentias del servitor LDAP
Name[it]=Impostazioni server LDAP
Name[ja]=LDAP サーバの設定
Name[ko]=LDAP 서버 설정
Name[nb]=LDAP tjenerinnstillinger
Name[nl]=LDAP-serverinstellingen
Name[nn]=Innstillingar for LDAP-tenar
Name[pl]=Ustawienia serwera LDAP
Name[pt]=Configuração do Servidor de LDAP
Name[pt_BR]=Configurações do servidor LDAP
Name[ru]=Настройка серверов LDAP
Name[sk]=Nastavenia servera LDAP
Name[sl]=Nastavitve strežnika LDAP
Name[sr]=Поставке ЛДАП сервера
Name[sr@ijekavian]=Поставке ЛДАП сервера
Name[sr@ijekavianlatin]=Postavke LDAP servera
Name[sr@latin]=Postavke LDAP servera
Name[sv]=LDAP-serverinställningar
Name[tr]=LDAP Sunucu Ayarları
Name[uk]=Параметри серверів LDAP
Name[x-test]=xxLDAP Server Settingsxx
Name[zh_CN]=LDAP 服务器设置
Name[zh_TW]=LDAP 伺服器設定
Comment=Configure the available LDAP servers
Comment[ar]=اضبط خواديم LDAP المتوفّرة
Comment[ca]=Configura els servidors LDAP disponibles
Comment[ca@valencia]=Configura els servidors LDAP disponibles
Comment[cs]=Nastavit dostupné servery LDAP
Comment[da]=Indstil de tilgængelige LDAP-servere
Comment[de]=Die verfügbaren LDAP-Server einrichten
Comment[en_GB]=Configure the available LDAP servers
Comment[es]=Configurar los servidores LDAP disponibles
Comment[et]=Saadaolevate LDAP serverite seadistamine
Comment[fi]=Saatavilla olevien LDAP-palvelinten asetukset
Comment[fr]=Configurer les serveurs LDAP disponibles
Comment[gl]=Configurar os servidores de LDAP dispoñíbeis
Comment[ia]=Configura le servitores LDAP accessibile
Comment[it]=Configura i server LDAP disponibili
Comment[ja]=利用可能な LDAP サーバの設定
Comment[ko]=사용 가능한 LDAP 서버 설정
Comment[nb]=Sett opp de tilgjengelige LDAP-tjenerne
Comment[nl]=De beschikbare LDAP-servers configureren
Comment[nn]=Set opp dei tilgjengelege LDAP-tenarane
Comment[pl]=Ustawienia dostępnych serwerów LDAP
Comment[pt]=Configurar os servidores de LDAP disponíveis
Comment[pt_BR]=Configura os servidores LDAP disponíveis
Comment[ru]=Настройка доступных серверов LDAP
Comment[sk]=Nastaviť dostupné servery LDAP
Comment[sl]=Nastavite razpoložljive strežnike LDAP
Comment[sr]=Подешавање доступних ЛДАП сервера
Comment[sr@ijekavian]=Подешавање доступних ЛДАП сервера
Comment[sr@ijekavianlatin]=Podešavanje dostupnih LDAP servera
Comment[sr@latin]=Podešavanje dostupnih LDAP servera
Comment[sv]=Anpassa tillgängliga LDAP-servrar
Comment[tr]=Kullanılabilir LDAP sunucularını yapılandır
Comment[uk]=Налаштовування доступних серверів LDAP
Comment[x-test]=xxConfigure the available LDAP serversxx
Comment[zh_CN]=配置可用 LDAP 服务器
Comment[zh_TW]=配置可用的 LDAP 伺服器
X-KDE-Keywords=kaddressbook, configure, settings, LDAP
X-KDE-Keywords[ar]=kaddressbook,configure,settings,LDAP,دفتر,عناوين,ضبط,إعدادات
X-KDE-Keywords[ca]=kaddressbook, configura, arranjament, LDAP
X-KDE-Keywords[ca@valencia]=kaddressbook, configura, arranjament, LDAP
X-KDE-Keywords[da]=kaddressbook, indstil, indstillinger, LDAP
X-KDE-Keywords[de]=KAddressbook,einstellen,konfigurieren,Konfiguration,Einrichtung,Einstellungen,LDAP
X-KDE-Keywords[en_GB]=kaddressbook, configure, settings, LDAP
X-KDE-Keywords[es]=kaddressbook, configurar, preferencias, LDAP
X-KDE-Keywords[et]=kde aadressiraamat, seadistamine, seadistused, LDAP
X-KDE-Keywords[fi]=kaddressbook, configure, settings, asetukset, LDAP
X-KDE-Keywords[fr]=KAddressBook, configuration, paramètres, LDAP
X-KDE-Keywords[gl]=kaddressbook, configurar, opcións, LDAP
X-KDE-Keywords[ia]=kaddressbook, configura, preferentias, LDAP
X-KDE-Keywords[it]=kaddressbook, configurazione, impostazioni, LDAP
X-KDE-Keywords[ko]=kaddressbook, configure, settings, LDAP, 설정, 주소록
X-KDE-Keywords[nb]=kaddressbook, oppsett, innstillinger, LDAP
X-KDE-Keywords[nl]=kaddressbook, instellen, instellingen, LDAP
X-KDE-Keywords[pl]=kaddressbook, konfiguruj, ustawienia, LDAP
X-KDE-Keywords[pt]=kaddressbook, configurar, configuração, LDAP
X-KDE-Keywords[pt_BR]=kaddressbook, configurar, configurações, LDAP
X-KDE-Keywords[ru]=kaddressbook,configure,settings,LDAP,адресная книга,настройки,настроить
X-KDE-Keywords[sk]=kaddressbook, nastaviť, nastavenia, LDAP
X-KDE-Keywords[sl]=kaddressbook, nastavi, nastavitve, LDAP
X-KDE-Keywords[sr]=kaddressbook,configure,settings,LDAP,К‑адресар,подешавање,подесити,поставке,ЛДАП
X-KDE-Keywords[sr@ijekavian]=kaddressbook,configure,settings,LDAP,К‑адресар,подешавање,подесити,поставке,ЛДАП
X-KDE-Keywords[sr@ijekavianlatin]=kaddressbook,configure,settings,LDAP,K‑adresar,podešavanje,podesiti,postavke,LDAP
X-KDE-Keywords[sr@latin]=kaddressbook,configure,settings,LDAP,K‑adresar,podešavanje,podesiti,postavke,LDAP
X-KDE-Keywords[sv]=adressbok, anpassa, inställningar, LDAP
X-KDE-Keywords[tr]=kaddressbook, yapılandırma, ayarlar, LDAP, adresdefteri
X-KDE-Keywords[uk]=kaddressbook,налаштувати,адресна,книга,параметри,лдап,configure,settings,LDAP
X-KDE-Keywords[x-test]=xxkaddressbookxx,xx configurexx,xx settingsxx,xx LDAPxx
X-KDE-Keywords[zh_CN]=kaddressbook, configure, settings, LDAP, 配置, 地址簿,设置
X-KDE-Keywords[zh_TW]=kaddressbook, configure, settings, LDAP
/*
This file is part of libkldap.
Copyright (c) 2003 - 2009 Tobias Koenig <tokoe@kde.org>
Copyright (C) 2013-2020 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KCMLDAP_H
#define KCMLDAP_H
#include <KCModule>
namespace KLDAP {
class LdapConfigureWidget;
}
class KCMLdap : public KCModule
{
Q_OBJECT
public:
explicit KCMLdap(QWidget *parent, const QVariantList &args);
~KCMLdap() override;
void load() override;
void save() override;
private:
KLDAP::LdapConfigureWidget *mLdapConfigureWidget = nullptr;
};
#endif
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