Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove unused attendee code
Introduced by commit fd6c474 which didn't use these for anything.
  • Loading branch information
pvuorela committed May 17, 2019
1 parent 114cd30 commit 8d222b2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion src/calendardata.h
Expand Up @@ -85,7 +85,6 @@ struct Notebook {
typedef QPair<QDate,QDate> Range;

struct Attendee {
bool isOwner;
bool isOrganizer;
QString name;
QString email;
Expand Down
17 changes: 0 additions & 17 deletions src/calendarevent.h
Expand Up @@ -48,8 +48,6 @@ class NemoCalendarEvent : public QObject
Q_ENUMS(TimeSpec)
Q_ENUMS(Secrecy)
Q_ENUMS(Response)
Q_ENUMS(ParticipantStatus)
Q_ENUMS(AttendeeRole)

Q_PROPERTY(QString displayLabel READ displayLabel NOTIFY displayLabelChanged)
Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
Expand Down Expand Up @@ -99,21 +97,6 @@ class NemoCalendarEvent : public QObject
ResponseDecline
};

enum ParticipantStatus {
NeedsAction,
Accepted,
Declined,
Tentative,
Delegated
};

enum AttendeeRole {
ReqParticipant,
OptParticipant,
NonParticipant,
Chair
};

NemoCalendarEvent(NemoCalendarManager *manager, const QString &uid, const KDateTime &recurrenceId);
~NemoCalendarEvent();

Expand Down
5 changes: 1 addition & 4 deletions src/calendarutils.cpp
Expand Up @@ -123,15 +123,13 @@ QList<NemoCalendarData::Attendee> NemoCalendarUtils::getEventAttendees(const KCa
organizer.isOrganizer = true;
organizer.name = calOrganizer->name();
organizer.email = calOrganizer->email();
organizer.isOwner = organizer.email == ownerEmail;
organizer.participationRole = KCalCore::Attendee::Chair;
result.append(organizer);
}

KCalCore::Attendee::List attendees = event->attendees();
NemoCalendarData::Attendee attendee;
attendee.isOrganizer = false;
attendee.isOwner = false;

foreach (KCalCore::Attendee::Ptr calAttendee, attendees) {
attendee.name = calAttendee->name();
Expand All @@ -140,8 +138,7 @@ QList<NemoCalendarData::Attendee> NemoCalendarUtils::getEventAttendees(const KCa
// avoid duplicate info
continue;
}
attendee.isOwner = attendee.email == ownerEmail;
if (attendee.isOwner) {
if (attendee.email == ownerEmail) {
attendee.status = calAttendee->status();
}
attendee.participationRole = calAttendee->role();
Expand Down

0 comments on commit 8d222b2

Please sign in to comment.