Commit 48f87573 authored by Laurent Montel's avatar Laurent Montel 😁

Use new pimcommon api (avoid duplicate code)

parent 5c3ba759
......@@ -60,7 +60,7 @@ find_package(KF5Declarative ${KF5_VERSION} CONFIG REQUIRED)
set(MAILCOMMON_LIB_VERSION "5.5.40")
set(GRAVATAR_LIB_VERSION "5.5.40")
set(PIMCOMMON_LIB_VERSION "5.5.40")
set(PIMCOMMON_LIB_VERSION "5.5.41")
set(GRANTLEETHEME_LIB_VERSION "5.5.40")
set(CALENDARSUPPORT_LIB_VERSION "5.5.40")
set(EVENTVIEW_LIB_VERSION "5.5.40")
......
......@@ -30,6 +30,7 @@
#include <Akonadi/Contact/ContactSearchJob>
#include <AkonadiCore/ItemCreateJob>
#include <KEmailAddress>
#include <PimCommon/PimUtil>
#include <QPointer>
#include <akonadi/contact/selectaddressbookdialog.h>
#include <AkonadiCore/AgentFilterProxyModel>
......@@ -246,18 +247,7 @@ void AutomaticAddContactsJob::addNextContact()
void AutomaticAddContactsJob::setEmails(const QStringList &list)
{
QString str;
for (int i = 0; i < list.count(); i++) {
QString tmpStr = list.at(i);
if (!tmpStr.trimmed().isEmpty()) {
if (!str.isEmpty()) {
str.append(QStringLiteral(", "));
}
str.append(tmpStr);
}
}
const QStringList emails = KEmailAddress::splitAddressList(str);
mEmails = emails;
mEmails = PimCommon::Util::generateEmailList(list);
}
void AutomaticAddContactsJob::setCollection(const Akonadi::Collection &collection)
......
......@@ -20,6 +20,7 @@
#include "checkattachmentjob.h"
#include <KEmailAddress>
#include <PimCommon/PimUtil>
CheckAttachmentJob::CheckAttachmentJob()
{
......@@ -51,18 +52,7 @@ QStringList CheckAttachmentJob::originalEmails() const
void CheckAttachmentJob::setOriginalEmails(const QStringList &list)
{
QString str;
for (int i = 0; i < list.count(); i++) {
QString tmpStr = list.at(i);
if (!tmpStr.trimmed().isEmpty()) {
if (!str.isEmpty()) {
str.append(QStringLiteral(", "));
}
str.append(tmpStr);
}
}
const QStringList emails = KEmailAddress::splitAddressList(str);
mOriginalEmails = emails;
mOriginalEmails = PimCommon::Util::generateEmailList(list);
}
QStringList CheckAttachmentJob::resultList() const
......
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