Commit bd7d7398 authored by Volker Krause's avatar Volker Krause
Browse files

Adapt to KCalCore::Person changes

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D21396
parent 7a821783
......@@ -25,7 +25,7 @@ include(ECMQtDeclareLoggingCategory)
set(KALARM_LIB_VERSION ${PIM_VERSION})
set(CALENDARCORE_LIB_VERSION "5.11.40")
set(CALENDARCORE_LIB_VERSION "5.11.42")
set(CALENDARUTILS_LIB_VERSION "5.11.40")
set(IDENTITYMANAGER_LIB_VERSION "5.11.40")
set(AKONADI_LIB_VERSION "5.11.40")
......
......@@ -241,7 +241,7 @@ void KAEventTest::constructors()
{
// Email alarm
const QString subject(QStringLiteral("Subject 1"));
const Person::Ptr addressee(new Person{QStringLiteral("Fred"), QStringLiteral("fred@freddy.com")});
const Person addressee{QStringLiteral("Fred"), QStringLiteral("fred@freddy.com")};
const Person::List addressees{addressee};
const QStringList attachments{QStringLiteral("/tmp/xyz"), QStringLiteral("/home/fred/attch.p")};
Event::Ptr kcalevent(new Event);
......@@ -552,7 +552,7 @@ Event::Ptr createKcalEvent(const QDateTime& start, const QDateTime& created, Ala
kcalalarm->setProgramArguments(QStringLiteral("-a PERM"));
break;
case Alarm::Email: {
Person::Ptr addr(new Person(QStringLiteral("Cliff Edge"), QStringLiteral("cliff@edge.com")));
Person addr(QStringLiteral("Cliff Edge"), QStringLiteral("cliff@edge.com"));
kcalalarm->setMailSubject(QStringLiteral("Subject"));
kcalalarm->setMailText(QStringLiteral("message"));
kcalalarm->setMailAddress(addr);
......
......@@ -5770,7 +5770,7 @@ EmailAddressList &EmailAddressList::operator=(const Person::List &addresses)
{
clear();
for (int p = 0, end = addresses.count(); p < end; ++p) {
if (!addresses[p]->email().isEmpty()) {
if (!addresses[p].email().isEmpty()) {
append(addresses[p]);
}
}
......@@ -5818,8 +5818,8 @@ QString EmailAddressList::address(int index) const
}
QString result;
bool quote = false;
const Person::Ptr person = (*this)[index];
const QString name = person->name();
const Person &person = (*this)[index];
const QString name = person.name();
if (!name.isEmpty()) {
// Need to enclose the name in quotes if it has any special characters
for (int i = 0, len = name.length(); i < len; ++i) {
......@@ -5830,12 +5830,12 @@ QString EmailAddressList::address(int index) const
break;
}
}
result += (*this)[index]->name();
result += (*this)[index].name();
result += (quote ? QLatin1String("\" <") : QLatin1String(" <"));
quote = true; // need angle brackets round email address
}
result += person->email();
result += person.email();
if (quote) {
result += QLatin1Char('>');
}
......@@ -5849,7 +5849,7 @@ QStringList EmailAddressList::pureAddresses() const
{
QStringList list;
for (int p = 0, end = count(); p < end; ++p) {
list += at(p)->email();
list += at(p).email();
}
return list;
}
......@@ -5867,7 +5867,7 @@ QString EmailAddressList::pureAddresses(const QString &separator) const
} else {
result += separator;
}
result += at(p)->email();
result += at(p).email();
}
return result;
}
......
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