Changeset View
Changeset View
Standalone View
Standalone View
src/individualmailcomponentfactory.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 38 | IndividualMessageQueueJob::IndividualMessageQueueJob(const KIdentityManagement::Identity &identity, const KCalendarCore::Attendee::List &update, const KCalendarCore::Attendee::List &edit, QObject *parent) | |||
---|---|---|---|---|---|
42 | , mIdentity(identity) | 42 | , mIdentity(identity) | ||
43 | , mQueueJob(nullptr) | 43 | , mQueueJob(nullptr) | ||
44 | , mComposerJob(nullptr) | 44 | , mComposerJob(nullptr) | ||
45 | { | 45 | { | ||
46 | } | 46 | } | ||
47 | 47 | | |||
48 | void IndividualMessageQueueJob::start() | 48 | void IndividualMessageQueueJob::start() | ||
49 | { | 49 | { | ||
50 | #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) | ||||
51 | const auto to = addressAttribute().to(); | ||||
52 | QSet<QString> attendeesTo(to.begin(), to.end()); | ||||
53 | const auto cc = addressAttribute().cc(); | ||||
54 | QSet<QString> attendeesCc(cc.begin(), cc.end()); | ||||
55 | #else | ||||
50 | QSet<QString> attendeesTo(QSet<QString>::fromList(addressAttribute().to())); | 56 | QSet<QString> attendeesTo(QSet<QString>::fromList(addressAttribute().to())); | ||
51 | QSet<QString> attendeesCc(QSet<QString>::fromList(addressAttribute().cc())); | 57 | QSet<QString> attendeesCc(QSet<QString>::fromList(addressAttribute().cc())); | ||
58 | #endif | ||||
52 | 59 | | |||
53 | QStringList attendeesAutoTo, attendeesAutoCc; | 60 | QStringList attendeesAutoTo, attendeesAutoCc; | ||
54 | for (const KCalendarCore::Attendee &attendee : qAsConst(mUpdate)) { | 61 | for (const KCalendarCore::Attendee &attendee : qAsConst(mUpdate)) { | ||
55 | if (attendeesTo.contains(attendee.email())) { | 62 | if (attendeesTo.contains(attendee.email())) { | ||
56 | attendeesAutoTo.append(attendee.fullName()); | 63 | attendeesAutoTo.append(attendee.fullName()); | ||
57 | } | 64 | } | ||
58 | if (attendeesCc.contains(attendee.email())) { | 65 | if (attendeesCc.contains(attendee.email())) { | ||
59 | attendeesAutoCc.append(attendee.fullName()); | 66 | attendeesAutoCc.append(attendee.fullName()); | ||
▲ Show 20 Lines • Show All 216 Lines • Show Last 20 Lines |