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

Save/restore completion weight

parent 3c8b3f29
......@@ -167,6 +167,7 @@ void LdapClientSearchConfig::readConfig(KLDAP::LdapServer &server, KConfigGroup
server.setMech(config.readEntry(prefix + QStringLiteral("Mech%1").arg(j), QString()));
server.setFilter(config.readEntry(prefix + QStringLiteral("UserFilter%1").arg(j), QString()));
server.setCompletionWeight(config.readEntry(prefix + QStringLiteral("CompletionWeight%1").arg(j), -1));
}
void LdapClientSearchConfig::writeConfig(const KLDAP::LdapServer &server, KConfigGroup &config, int j, bool active)
......@@ -225,6 +226,9 @@ void LdapClientSearchConfig::writeConfig(const KLDAP::LdapServer &server, KConfi
config.writeEntry(prefix + QStringLiteral("Auth%1").arg(j), tmp);
config.writeEntry(prefix + QStringLiteral("Mech%1").arg(j), server.mech());
config.writeEntry(prefix + QStringLiteral("UserFilter%1").arg(j), server.filter().trimmed());
if (server.completionWeight() > -1) {
config.writeEntry(prefix + QStringLiteral("CompletionWeight%1").arg(j), server.completionWeight());
}
}
void LdapClientSearchConfig::slotWalletClosed()
......
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