Changeset View
Changeset View
Standalone View
Standalone View
resources/kolab/pimkolab/kolabformatV2/incidence.cpp
Show First 20 Lines • Show All 837 Lines • ▼ Show 20 Line(s) | 810 | { | |||
---|---|---|---|---|---|
838 | 838 | | |||
839 | if (!incidence->organizer().isEmpty()) { | 839 | if (!incidence->organizer().isEmpty()) { | ||
840 | Email org(incidence->organizer().name(), incidence->organizer().email()); | 840 | Email org(incidence->organizer().name(), incidence->organizer().email()); | ||
841 | setOrganizer(org); | 841 | setOrganizer(org); | ||
842 | } | 842 | } | ||
843 | 843 | | |||
844 | // Attendees: | 844 | // Attendees: | ||
845 | const KCalCore::Attendee::List attendees = incidence->attendees(); | 845 | const KCalCore::Attendee::List attendees = incidence->attendees(); | ||
846 | foreach (const KCalCore::Attendee::Ptr &kcalAttendee, attendees) { | 846 | foreach (const KCalCore::Attendee &kcalAttendee, attendees) { | ||
847 | Attendee attendee; | 847 | Attendee attendee; | ||
848 | 848 | | |||
849 | attendee.displayName = kcalAttendee->name(); | 849 | attendee.displayName = kcalAttendee.name(); | ||
850 | attendee.smtpAddress = kcalAttendee->email(); | 850 | attendee.smtpAddress = kcalAttendee.email(); | ||
851 | attendee.status = attendeeStatusToString(kcalAttendee->status()); | 851 | attendee.status = attendeeStatusToString(kcalAttendee.status()); | ||
852 | attendee.requestResponse = kcalAttendee->RSVP(); | 852 | attendee.requestResponse = kcalAttendee.RSVP(); | ||
853 | // TODO: KCalCore::Attendee::mFlag is not accessible | 853 | // TODO: KCalCore::Attendee::mFlag is not accessible | ||
854 | // attendee.invitationSent = kcalAttendee->mFlag; | 854 | // attendee.invitationSent = kcalAttendee->mFlag; | ||
855 | // DF: Hmm? mFlag is set to true and never used at all.... Did you mean another field? | 855 | // DF: Hmm? mFlag is set to true and never used at all.... Did you mean another field? | ||
856 | attendee.role = attendeeRoleToString(kcalAttendee->role()); | 856 | attendee.role = attendeeRoleToString(kcalAttendee.role()); | ||
857 | attendee.delegate = kcalAttendee->delegate(); | 857 | attendee.delegate = kcalAttendee.delegate(); | ||
858 | attendee.delegator = kcalAttendee->delegator(); | 858 | attendee.delegator = kcalAttendee.delegator(); | ||
859 | 859 | | |||
860 | addAttendee(attendee); | 860 | addAttendee(attendee); | ||
861 | } | 861 | } | ||
862 | 862 | | |||
863 | mAttachments.clear(); | 863 | mAttachments.clear(); | ||
864 | 864 | | |||
865 | // Attachments | 865 | // Attachments | ||
866 | const KCalCore::Attachment::List attachments = incidence->attachments(); | 866 | const KCalCore::Attachment::List attachments = incidence->attachments(); | ||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 955 | } else { | |||
956 | incidence->setOrganizer(organizer().displayName + QLatin1Char('<') | 956 | incidence->setOrganizer(organizer().displayName + QLatin1Char('<') | ||
957 | + organizer().smtpAddress + QLatin1Char('>')); | 957 | + organizer().smtpAddress + QLatin1Char('>')); | ||
958 | } | 958 | } | ||
959 | 959 | | |||
960 | incidence->clearAttendees(); | 960 | incidence->clearAttendees(); | ||
961 | foreach (const Attendee &attendee, mAttendees) { | 961 | foreach (const Attendee &attendee, mAttendees) { | ||
962 | KCalCore::Attendee::PartStat status = attendeeStringToStatus(attendee.status); | 962 | KCalCore::Attendee::PartStat status = attendeeStringToStatus(attendee.status); | ||
963 | KCalCore::Attendee::Role role = attendeeStringToRole(attendee.role); | 963 | KCalCore::Attendee::Role role = attendeeStringToRole(attendee.role); | ||
964 | KCalCore::Attendee::Ptr a(new KCalCore::Attendee(attendee.displayName, | 964 | KCalCore::Attendee a(attendee.displayName, | ||
965 | attendee.smtpAddress, | 965 | attendee.smtpAddress, | ||
966 | attendee.requestResponse, | 966 | attendee.requestResponse, | ||
967 | status, role)); | 967 | status, role); | ||
968 | a->setDelegate(attendee.delegate); | 968 | a.setDelegate(attendee.delegate); | ||
969 | a->setDelegator(attendee.delegator); | 969 | a.setDelegator(attendee.delegator); | ||
970 | incidence->addAttendee(a); | 970 | incidence->addAttendee(a); | ||
971 | } | 971 | } | ||
972 | 972 | | |||
973 | incidence->clearAttachments(); | 973 | incidence->clearAttachments(); | ||
974 | foreach (const KCalCore::Attachment::Ptr &a, mAttachments) { | 974 | foreach (const KCalCore::Attachment::Ptr &a, mAttachments) { | ||
975 | // TODO should we copy? | 975 | // TODO should we copy? | ||
976 | incidence->addAttachment(a); | 976 | incidence->addAttachment(a); | ||
977 | } | 977 | } | ||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |