7#include "addresseelineeditbaloo.h"
8#include "baloocompletionemail.h"
10#include <KSharedConfig>
14AddresseeLineEditBaloo::AddresseeLineEditBaloo()
15 : mBalooCompletionEmail(new
PimCommon::BalooCompletionEmail)
20AddresseeLineEditBaloo::~AddresseeLineEditBaloo()
22 delete mBalooCompletionEmail;
25int AddresseeLineEditBaloo::balooCompletionSource()
const
27 return mBalooCompletionSource;
30void AddresseeLineEditBaloo::setBalooCompletionSource(
int value)
32 mBalooCompletionSource = value;
35QStringList AddresseeLineEditBaloo::balooBlackList()
const
37 return mBalooCompletionEmail->balooCompletionEmailInfo().mBlackList;
40QStringList AddresseeLineEditBaloo::domainExcludeList()
const
42 return mBalooCompletionEmail->balooCompletionEmailInfo().mExcludeDomains;
45void AddresseeLineEditBaloo::loadBalooBlackList()
48 config->reparseConfiguration();
49 KConfigGroup group(config, QStringLiteral(
"AddressLineEdit"));
50 PimCommon::BalooCompletionEmail::BalooCompletionEmailInfo info;
53 const QStringList lstExcludeEmailsRegularExpressions = group.readEntry(
"ExcludeEmailsRegexp",
QStringList());
55 info.mExcludeEmailsRegularExpressions = lstExcludeEmailsRegularExpressions;
56 info.mBlackList = balooBlackList;
57 info.mExcludeDomains = domainExcludeList;
58 mBalooCompletionEmail->setBalooCompletionEmailInfo(info);
63 PimCommon::BalooCompletionEmail::BalooCompletionEmailInfo info = mBalooCompletionEmail->balooCompletionEmailInfo();
64 info.mListEmail = inputList;
65 mBalooCompletionEmail->setBalooCompletionEmailInfo(info);
66 return mBalooCompletionEmail->cleanupEmailList();
static KSharedConfig::Ptr openConfig(const QString &fileName=QString(), OpenFlags mode=FullConfig, QStandardPaths::StandardLocation type=QStandardPaths::GenericConfigLocation)