summaryrefslogtreecommitdiffabout
path: root/korganizer/koimportoldialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koimportoldialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koimportoldialog.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index 16f2eca..0a3c2d5 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -436,14 +436,22 @@ void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRe
role = KCal::Attendee::ReqParticipant;
else if ( optAtt.find( name ) >= 0 )
role = KCal::Attendee::OptParticipant;
else
role = KCal::Attendee::NonParticipant;
QString mail = QString::fromUcs2(pItem->GetAddress().GetBuffer());
- if( mail.isEmpty() && name.find("@") > 0 )
- mail = name;
+ if( mail.isEmpty() && name.find("@") > 0 ) {
+ int kl = name.find("<");
+ int gr = name.find(">");
+ if ( kl >= 0 && gr >= 0) {
+ mail = name.mid (kl+1, gr - kl -1);
+ name = name.left( kl );
+ }
+ else
+ mail = name;
+ }
mail = mail.stripWhiteSpace();
QString uid = getUidByEmail( mail );
//uid = QString::fromUcs2( pItem->GetEntryID().GetBuffer());
KCal::Attendee * a = new KCal::Attendee( name, mail,rsvp,stat,role,uid) ;
event->addAttendee( a , false );