diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ set(AKONADI_MIMELIB_VERSION "5.11.40") set(AKONADI_CONTACT_VERSION "5.11.40") -set(KCALENDARCORE_LIB_VERSION "5.11.42") +set(KCALENDARCORE_LIB_VERSION "5.11.44") set(IDENTITYMANAGEMENT_LIB_VERSION "5.11.40") set(KLDAP_LIB_VERSION "5.11.40") set(KMAILTRANSPORT_LIB_VERSION "5.11.40") diff --git a/korgac/mailclient.cpp b/korgac/mailclient.cpp --- a/korgac/mailclient.cpp +++ b/korgac/mailclient.cpp @@ -61,7 +61,7 @@ bool MailClient::mailAttendees(const KCalCore::IncidenceBase::Ptr &incidence, const KIdentityManagement::Identity &identity, bool bccMe, const QString &attachment, const QString &mailTransport) { - KCalCore::Attendee::List attendees = incidence->attendees(); + const KCalCore::Attendee::List attendees = incidence->attendees(); if (attendees.isEmpty()) { qCWarning(KOALARMCLIENT_LOG) << "There are no attendees to e-mail"; return false; @@ -72,11 +72,8 @@ QStringList toList; QStringList ccList; - const int numberOfAttendees(attendees.count()); - for (int i = 0; i < numberOfAttendees; ++i) { - KCalCore::Attendee::Ptr a = attendees.at(i); - - const QString email = a->email(); + for (const auto &a : attendees) { + const QString email = a.email(); if (email.isEmpty()) { continue; } @@ -90,15 +87,15 @@ // Build a nice address for this attendee including the CN. QString tname, temail; - const QString username = KEmailAddress::quoteNameIfNecessary(a->name()); + const QString username = KEmailAddress::quoteNameIfNecessary(a.name()); // ignore the return value from extractEmailAddressAndName() because // it will always be false since tusername does not contain "@domain". KEmailAddress::extractEmailAddressAndName(username, temail /*byref*/, tname /*byref*/); tname += QStringLiteral(" <") + email + QLatin1Char('>'); // Optional Participants and Non-Participants are copied on the email - if (a->role() == KCalCore::Attendee::OptParticipant - || a->role() == KCalCore::Attendee::NonParticipant) { + if (a.role() == KCalCore::Attendee::OptParticipant + || a.role() == KCalCore::Attendee::NonParticipant) { ccList << tname; } else { toList << tname; diff --git a/src/calendarview.cpp b/src/calendarview.cpp --- a/src/calendarview.cpp +++ b/src/calendarview.cpp @@ -1896,8 +1896,8 @@ const bool organizerEvents = CalendarSupport::KCalPrefs::instance()->thatIsMe(incidence->organizer().email()); - const bool groupEvents = incidence->attendeeByMails( - CalendarSupport::KCalPrefs::instance()->allEmails()); + const bool groupEvents = !incidence->attendeeByMails( + CalendarSupport::KCalPrefs::instance()->allEmails()).isNull(); if (incidence->type() == KCalCore::Incidence::TypeTodo) { todo = true; diff --git a/src/dialog/searchdialog.cpp b/src/dialog/searchdialog.cpp --- a/src/dialog/searchdialog.cpp +++ b/src/dialog/searchdialog.cpp @@ -243,8 +243,8 @@ } if (m_ui->attendeeCheck->isChecked()) { const KCalCore::Attendee::List lstAttendees = ev->attendees(); - for (const KCalCore::Attendee::Ptr &attendee : lstAttendees) { - if (re.indexIn(attendee->fullName()) != -1) { + for (const KCalCore::Attendee &attendee : lstAttendees) { + if (re.indexIn(attendee.fullName()) != -1) { mMatchedEvents.append(item); break; }