summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koimportoldialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index c4d5f06..7aa6076 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -421,66 +421,66 @@ void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRe
421 stat = Attendee::Tentative ; 421 stat = Attendee::Tentative ;
422 break; 422 break;
423 case 3: //accepted 423 case 3: //accepted
424 stat = Attendee::Accepted; 424 stat = Attendee::Accepted;
425 break; 425 break;
426 case 4: //declined 426 case 4: //declined
427 stat =Attendee::Declined ; 427 stat =Attendee::Declined ;
428 break; 428 break;
429 default: 429 default:
430 stat = Attendee::NeedsAction ; 430 stat = Attendee::NeedsAction ;
431 431
432 } 432 }
433 KCal::Attendee::Role role; 433 KCal::Attendee::Role role;
434 if ( event->organizer() == name ) 434 if ( event->organizer() == name )
435 role = KCal::Attendee::Chair; 435 role = KCal::Attendee::Chair;
436 else if ( reqAtt.find( name ) >= 0 ) 436 else if ( reqAtt.find( name ) >= 0 )
437 role = KCal::Attendee::ReqParticipant; 437 role = KCal::Attendee::ReqParticipant;
438 else if ( optAtt.find( name ) >= 0 ) 438 else if ( optAtt.find( name ) >= 0 )
439 role = KCal::Attendee::OptParticipant; 439 role = KCal::Attendee::OptParticipant;
440 else 440 else
441 role = KCal::Attendee::NonParticipant; 441 role = KCal::Attendee::NonParticipant;
442 QString mail = QString::fromUcs2(pItem->GetAddress().GetBuffer()); 442 QString mail = QString::fromUcs2(pItem->GetAddress().GetBuffer());
443 if( mail.isEmpty() && name.find("@") > 0 ) { 443 if( mail.isEmpty() && name.find("@") > 0 ) {
444 int kl = name.find("<"); 444 int kl = name.find("<");
445 int gr = name.find(">"); 445 int gr = name.find(">");
446 if ( kl >= 0 && gr >= 0) { 446 if ( kl >= 0 && gr >= 0) {
447 mail = name.mid (kl+1, gr - kl -1); 447 mail = name.mid (kl+1, gr - kl -1);
448 name = name.left( kl ); 448 name = name.left( kl );
449 } 449 }
450 else 450 else
451 mail = name; 451 mail = name;
452 } 452 }
453 mail = mail.stripWhiteSpace(); 453 mail = mail.stripWhiteSpace();
454 454
455 QString uid = getUidByEmail( mail ); 455 QString uid = getUidByEmail( mail );
456 //uid = QString::fromUcs2( pItem->GetEntryID().GetBuffer()); 456 //uid = QString::fromUcs2( pItem->GetEntryID().GetBuffer());
457 KCal::Attendee * a = new KCal::Attendee( name, mail,rsvp,stat,role,uid) ; 457 KCal::Attendee * a = new KCal::Attendee( name, mail,rsvp,stat,role,uid) ;
458 event->addAttendee( a , false ); 458 event->addAttendee( a , false );
459 itm->Release(); 459 itm->Release();
460 } 460 }
461 461
462 462
463 if ( !mCalendar->addEventNoDup( event )) 463 if ( !mCalendar->addEventNoDup( event ))
464 delete event; 464 delete event;
465 else { 465 else {
466 // QString mes = i18n("Importing %1.\n date: %2 date: %3").arg( event->summary()).arg( event->dtStart().toString()).arg( event->dtEnd().toString()); 466 // QString mes = i18n("Importing %1.\n date: %2 date: %3").arg( event->summary()).arg( event->dtStart().toString()).arg( event->dtEnd().toString());
467 //KMessageBox::information(this,mes); 467 //KMessageBox::information(this,mes);
468 ++importedItems; 468 ++importedItems;
469 } 469 }
470} 470}
471void KOImportOLdialog::slotCancel() 471void KOImportOLdialog::slotCancel()
472{ 472{
473 reject(); 473 reject();
474} 474}
475 475
476QString KOImportOLdialog::getUidByEmail( QString email ) 476QString KOImportOLdialog::getUidByEmail( QString email )
477{ 477{
478 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 478 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
479 KABC::AddressBook::Iterator it; 479 KABC::AddressBook::Iterator it;
480 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 480 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
481 QStringList em = (*it).emails(); 481 QStringList em = (*it).emails();
482 if ( em.contains( email )) 482 if ( em.contains( email ))
483 return (*it).uid(); 483 return (*it).uid();
484 } 484 }
485 return ""; 485 return email;
486} 486}