-rw-r--r-- | kabc/plugins/qtopia/qtopiaconverter.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kabc/plugins/qtopia/qtopiaconverter.cpp b/kabc/plugins/qtopia/qtopiaconverter.cpp index ac513b6..7d00a3f 100644 --- a/kabc/plugins/qtopia/qtopiaconverter.cpp +++ b/kabc/plugins/qtopia/qtopiaconverter.cpp @@ -70,17 +70,24 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a { // name addr.setFormattedName(contact.fileAs()); addr.setFamilyName( contact.lastName() ); addr.setGivenName( contact.firstName() ); addr.setAdditionalName( contact.middleName() ); addr.setPrefix( contact.nameTitle() ); addr.setSuffix( contact.suffix() ); - + QString exuid = contact.uid().toString(); + int ente = exuid.find( "-0000"); + if ( exuid.left(1) == "{" ) + exuid = exuid.mid(1); + if ( ente > -1 ) + exuid = exuid.left( ente-1 ); + addr.setExternalUID( exuid ); + //qDebug("QtopiaConverter:set uid %s ",addr.externalUID().latin1() ); // email QStringList emails = contact.emailList(); for ( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) { addr.insertEmail( *it, ((*it) == contact.defaultEmail()) ); } if (!contact.defaultEmail().isEmpty()) |