summaryrefslogtreecommitdiffabout
path: root/korganizer/koimportoldialog.cpp
authorzautrix <zautrix>2004-07-12 13:32:09 (UTC)
committer zautrix <zautrix>2004-07-12 13:32:09 (UTC)
commit915a3b162dea2755ec1c8267a9c9f65709bce602 (patch) (unidiff)
tree75b3d15a2386a4da7ab790a1f249ff811a7a7ae8 /korganizer/koimportoldialog.cpp
parentcbc789907408fa3359444c464ba5a86be892f301 (diff)
downloadkdepimpi-915a3b162dea2755ec1c8267a9c9f65709bce602.zip
kdepimpi-915a3b162dea2755ec1c8267a9c9f65709bce602.tar.gz
kdepimpi-915a3b162dea2755ec1c8267a9c9f65709bce602.tar.bz2
Another win import fix
Diffstat (limited to 'korganizer/koimportoldialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koimportoldialog.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index 36363e5..16f2eca 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -48,2 +48,3 @@
48#include <libkcal/icalformat.h> 48#include <libkcal/icalformat.h>
49#include <kabc/stdaddressbook.h>
49 50
@@ -442,8 +443,6 @@ void KOImportOLdialog::ol2kopiCalendar( _AppointmentItem * aItem, bool computeRe
442 mail = name; 443 mail = name;
443 QString uid;
444 if ( mail.isEmpty() )
445 uid = QString::fromUcs2( pItem->GetEntryID().GetBuffer());
446 else
447 uid = mail;
448 mail = mail.stripWhiteSpace(); 444 mail = mail.stripWhiteSpace();
445
446 QString uid = getUidByEmail( mail );
447 //uid = QString::fromUcs2( pItem->GetEntryID().GetBuffer());
449 KCal::Attendee * a = new KCal::Attendee( name, mail,rsvp,stat,role,uid) ; 448 KCal::Attendee * a = new KCal::Attendee( name, mail,rsvp,stat,role,uid) ;
@@ -466 +465,13 @@ void KOImportOLdialog::slotCancel()
466} 465}
466
467QString KOImportOLdialog::getUidByEmail( QString email )
468{
469 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
470 KABC::AddressBook::Iterator it;
471 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
472 QStringList em = (*it).emails();
473 if ( em.contains( email ))
474 return (*it).uid();
475 }
476 return "";
477}