Commit 28a37e94 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Return default attributes

parent 714842bf
Pipeline #42970 passed with stage
in 9 minutes and 18 seconds
cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.16.43")
set(PIM_VERSION "5.16.44")
project(KLdap VERSION ${PIM_VERSION})
......
......@@ -73,11 +73,7 @@ LdapClientSearch::LdapClientSearch(QObject *parent)
: QObject(parent)
, d(new Private(this))
{
const QStringList attr{ QStringLiteral("cn")
, QStringLiteral("mail")
, QStringLiteral("givenname")
, QStringLiteral("sn")};
d->init(attr);
d->init(LdapClientSearch::defaultAttributes());
}
LdapClientSearch::LdapClientSearch(const QStringList &attr, QObject *parent)
......@@ -159,6 +155,15 @@ void LdapClientSearch::setAttributes(const QStringList &attrs)
}
}
QStringList LdapClientSearch::defaultAttributes()
{
const QStringList attr{ QStringLiteral("cn")
, QStringLiteral("mail")
, QStringLiteral("givenname")
, QStringLiteral("sn")};
return attr;
}
void LdapClientSearch::Private::readConfig()
{
q->cancelSearch();
......
......@@ -131,6 +131,8 @@ public:
*/
void setAttributes(const QStringList &);
static Q_REQUIRED_RESULT QStringList defaultAttributes();
Q_SIGNALS:
/**
* This signal is emitted whenever new contacts have been found
......
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