Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3ba08666 authored by Laurent Montel's avatar Laurent Montel 😁

Don't expand address if this address is from a contactgroup.

We must expand just contact group
parent 76144234
......@@ -444,17 +444,27 @@ void IncidenceAttendee::expandResult(KJob *job)
Q_ASSERT(mExpandGroupJobs.contains(job));
KCalCore::Attendee::Ptr attendee = mExpandGroupJobs.take(job);
int row = dataModel()->attendees().indexOf(attendee);
dataModel()->removeRow(row);
const QString currentEmail = attendee->email();
const KContacts::Addressee::List groupMembers = expandJob->contacts();
bool wasACorrectEmail = false;
for (const KContacts::Addressee &member : groupMembers) {
KCalCore::Attendee::Ptr newAt(new KCalCore::Attendee(
member.realName(), member.preferredEmail(),
attendee->RSVP(),
attendee->status(),
attendee->role(),
member.uid()));
dataModel()->insertAttendee(row, newAt);
if (member.preferredEmail() == currentEmail) {
wasACorrectEmail = true;
break;
}
}
if (!wasACorrectEmail) {
dataModel()->removeRow(row);
for (const KContacts::Addressee &member : groupMembers) {
KCalCore::Attendee::Ptr newAt(new KCalCore::Attendee(
member.realName(), member.preferredEmail(),
attendee->RSVP(),
attendee->status(),
attendee->role(),
member.uid()));
dataModel()->insertAttendee(row, newAt);
}
}
}
......
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