Commit f9751be2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use new api

parent 8d587145
Pipeline #42103 passed with stage
in 12 minutes and 30 seconds
......@@ -40,7 +40,7 @@ set(KDEPIM_VERSION "${PIM_VERSION}${KDEPIM_DEV_VERSION} (${RELEASE_SERVICE_VERSI
set(AKONADI_MIMELIB_VERSION "5.16.40")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.16.40")
set(KLDAP_LIB_VERSION "5.16.40")
set(KLDAP_LIB_VERSION "5.16.41")
set(KMAILTRANSPORT_LIB_VERSION "5.16.40")
set(AKONADI_VERSION "5.16.40")
set(KIMAP_LIB_VERSION "5.16.40")
......
......@@ -7,6 +7,7 @@
#include "ldap.h"
#include <KLDAP/LdapClientSearchConfig>
#include <KLDAP/AddHostDialog>
#include <KLDAP/LdapClientSearchConfigWriteConfigJob>
#include <KConfig>
#include <KConfigGroup>
......@@ -166,11 +167,21 @@ void Ldap::destroy()
group = KConfigGroup(c, QStringLiteral("LDAP"));
for (int i = 0; i < cSelHosts - 1; ++i) {
m_clientSearchConfig->writeConfig(selHosts.at(i), group, i, true);
auto job = new KLDAP::LdapClientSearchConfigWriteConfigJob;
job->setActive(true);
job->setConfig(group);
job->setServer(selHosts.at(i));
job->setServerIndex(i);
job->start();
}
for (int i = 0; i < cHosts; ++i) {
m_clientSearchConfig->writeConfig(hosts.at(i), group, i, false);
auto job = new KLDAP::LdapClientSearchConfigWriteConfigJob;
job->setActive(false);
job->setConfig(group);
job->setServer(hosts.at(i));
job->setServerIndex(i);
job->start();
}
group.writeEntry(QStringLiteral("NumSelectedHosts"), cSelHosts - 1);
......@@ -195,7 +206,12 @@ void Ldap::edit()
KLDAP::AddHostDialog dlg(&server, nullptr);
if (dlg.exec() && !server.host().isEmpty()) { //krazy:exclude=crashy
clientSearchConfig.writeConfig(server, group, m_entry, true);
auto job = new KLDAP::LdapClientSearchConfigWriteConfigJob;
job->setActive(true);
job->setConfig(group);
job->setServer(server);
job->setServerIndex(m_entry);
job->start();
}
}
......
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