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

Adapt to KCalCore::Attendee changes

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D21822
parent 73e30739
......@@ -30,7 +30,7 @@ set(EVENTVIEW_LIB_VERSION ${PIM_VERSION})
set(CALENDARUTILS_LIB_VERSION "5.11.40")
set(AKONADI_LIB_VERSION "5.11.40")
set(QT_REQUIRED_VERSION "5.10.0")
set(KCALENDARCORE_LIB_VERSION "5.11.42")
set(KCALENDARCORE_LIB_VERSION "5.11.44")
set(AKONADICALENDAR_LIB_VERSION "5.11.40")
set(KMIME_LIB_VERSION "5.11.40")
set(LIBKDEPIM_LIB_VERSION "5.11.40")
......
......@@ -144,16 +144,15 @@ void AgendaItem::updateIcons()
mIconGroupTent = false;
mIconOrganizer = true;
} else {
KCalCore::Attendee::Ptr me
= mIncidence->attendeeByMails(mEventView->kcalPreferences()->allEmails());
KCalCore::Attendee me = mIncidence->attendeeByMails(mEventView->kcalPreferences()->allEmails());
if (me) {
if (me->status() == KCalCore::Attendee::NeedsAction && me->RSVP()) {
if (!me.isNull()) {
if (me.status() == KCalCore::Attendee::NeedsAction && me.RSVP()) {
mIconReply = true;
mIconGroup = false;
mIconGroupTent = false;
mIconOrganizer = false;
} else if (me->status() == KCalCore::Attendee::Tentative) {
} else if (me.status() == KCalCore::Attendee::Tentative) {
mIconReply = false;
mIconGroup = false;
mIconGroupTent = true;
......@@ -643,7 +642,7 @@ void AgendaItem::addAttendee(const QString &newAttendee)
QString name, email;
KEmailAddress::extractEmailAddressAndName(newAttendee, email, name);
if (!(name.isEmpty() && email.isEmpty())) {
mIncidence->addAttendee(KCalCore::Attendee::Ptr(new KCalCore::Attendee(name, email)));
mIncidence->addAttendee(KCalCore::Attendee(name, email));
KMessageBox::information(
this,
i18n("Attendee \"%1\" added to the calendar item \"%2\"",
......
......@@ -634,7 +634,7 @@ bool EventView::makesWholeDayBusy(const KCalCore::Incidence::Ptr &incidence) con
KCalCore::Attendee::List attendees = ev->attendees();
KCalCore::Attendee::List::ConstIterator it;
for (it = attendees.constBegin(); it != attendees.constEnd(); ++it) {
if (kcalPreferences()->thatIsMe((*it)->email())) {
if (kcalPreferences()->thatIsMe((*it).email())) {
return true;
}
}
......
......@@ -780,8 +780,7 @@ bool TodoModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int r
QString name, email, comment;
if (KEmailAddress::splitAddress(*it, name, email, comment)
== KEmailAddress::AddressOk) {
destTodo->addAttendee(
KCalCore::Attendee::Ptr(new KCalCore::Attendee(name, email)));
destTodo->addAttendee(KCalCore::Attendee(name, email));
}
}
}
......
......@@ -192,9 +192,9 @@ void WhatsNextView::updateView()
events = calendar()->events(QDate::currentDate(), QDate(2975, 12, 6),
QTimeZone::systemTimeZone());
for (const KCalCore::Event::Ptr &ev : qAsConst(events)) {
KCalCore::Attendee::Ptr me = ev->attendeeByMails(myEmails);
if (me != nullptr) {
if (me->status() == KCalCore::Attendee::NeedsAction && me->RSVP()) {
KCalCore::Attendee me = ev->attendeeByMails(myEmails);
if (!me.isNull()) {
if (me.status() == KCalCore::Attendee::NeedsAction && me.RSVP()) {
if (replies == 0) {
mText += QLatin1String("<p></p>");
kil->loadIcon(QStringLiteral("mail-reply-sender"), KIconLoader::NoGroup, 22,
......@@ -213,9 +213,9 @@ void WhatsNextView::updateView()
}
todos = calendar()->todos();
for (const KCalCore::Todo::Ptr &to : qAsConst(todos)) {
KCalCore::Attendee::Ptr me = to->attendeeByMails(myEmails);
if (me != nullptr) {
if (me->status() == KCalCore::Attendee::NeedsAction && me->RSVP()) {
KCalCore::Attendee me = to->attendeeByMails(myEmails);
if (!me.isNull()) {
if (me.status() == KCalCore::Attendee::NeedsAction && me.RSVP()) {
if (replies == 0) {
mText += QLatin1String("<p></p>");
kil->loadIcon(QStringLiteral("mail-reply-sender"), KIconLoader::NoGroup, 22,
......
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