From kde-commits Fri Feb 23 20:40:25 2007 From: Allen Winter Date: Fri, 23 Feb 2007 20:40:25 +0000 To: kde-commits Subject: branches/KDE/3.5/kdepim/libkcal Message-Id: <1172263225.347620.12536.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=117226324006959 SVN commit 636690 by winterz: backport SVN commit 632687 by djarvie: Remove MAILTO: from email addresses. David: I made sure that libical is identical in trunk and branch. Therefore, in theory, this should be needed in trunk and branch. I don't think it should cause problems in any case. M +9 -3 icalformatimpl.cpp --- branches/KDE/3.5/kdepim/libkcal/icalformatimpl.cpp #636689:636690 @@ -334,7 +334,7 @@ icalcomponent_add_property(parent,icalproperty_new_lastmodified( writeICalDateTime(incidence->lastModified()))); } - + // description if (!incidence->description().isEmpty()) { icalcomponent_add_property(parent,icalproperty_new_description( @@ -1092,6 +1092,9 @@ icalparameter *p = 0; QString email = QString::fromUtf8(icalproperty_get_attendee(attendee)); + if ( email.startsWith( "mailto:", false ) ) { + email = email.mid( 7 ); + } QString name; QString uid = QString::null; @@ -1175,7 +1178,7 @@ Person ICalFormatImpl::readOrganizer( icalproperty *organizer ) { QString email = QString::fromUtf8(icalproperty_get_organizer(organizer)); - if ( email.startsWith("mailto:", false ) ) { + if ( email.startsWith( "mailto:", false ) ) { email = email.mid( 7 ); } QString cn; @@ -1407,7 +1410,7 @@ } // Fix incorrect alarm settings by other applications (like outloook 9) if ( mCompat ) mCompat->fixAlarms( incidence ); - + } void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *incidenceBase) @@ -1668,6 +1671,9 @@ // Only in EMAIL alarm case ICAL_ATTENDEE_PROPERTY: { QString email = QString::fromUtf8(icalproperty_get_attendee(p)); + if ( email.startsWith("mailto:", false ) ) { + email = email.mid( 7 ); + } QString name; icalparameter *param = icalproperty_get_first_parameter(p,ICAL_CN_PARAMETER); if (param) {