author | ulf69 <ulf69> | 2004-07-19 20:04:49 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-19 20:04:49 (UTC) |
commit | 2389d07165786dc4d99cac043947b555fdd7d86e (patch) (side-by-side diff) | |
tree | 1abe3227f3ee86a2159f72245465b65c748ce619 | |
parent | d498ea750239bffa7ec811aa3e60befc6bae9608 (diff) | |
download | kdepimpi-2389d07165786dc4d99cac043947b555fdd7d86e.zip kdepimpi-2389d07165786dc4d99cac043947b555fdd7d86e.tar.gz kdepimpi-2389d07165786dc4d99cac043947b555fdd7d86e.tar.bz2 |
code cleanup
-rw-r--r-- | kabc/converter/qtopia/qtopiaconverter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kabc/converter/qtopia/qtopiaconverter.cpp b/kabc/converter/qtopia/qtopiaconverter.cpp index 498e89e..ac513b6 100644 --- a/kabc/converter/qtopia/qtopiaconverter.cpp +++ b/kabc/converter/qtopia/qtopiaconverter.cpp @@ -212,49 +212,51 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() ); if (contact.birthday().isValid()) addr.setBirthday( contact.birthday() ); addr.setNickName( contact.nickname() ); // others //US I put opies BusinessWebPage into Ka/Pi's notes block, because no other native field is available. QString notes = contact.notes(); notes += "\nBusinessWebPage: " + contact.businessWebpage() + "\n"; addr.setNote( contact.notes() ); //US QString groups() const { return find( Qtopia::Groups ); } //US QStringList groupList() const; QArray<int> catArray = contact.categories(); QString cat; for ( unsigned int i=0; i < catArray.size(); i++ ) { cat = catDB->label("contact", catArray[i]); - if ( !cat.isEmpty() ) + if ( cat.isEmpty() ) + addr.insertCategory(QString::number(catArray[i])); + else addr.insertCategory( cat ); } return true; } bool QtopiaConverter::addresseeToQtopia( const Addressee &addr, PimContact &contact ) { // name contact.setLastName(addr.familyName()); contact.setFirstName(addr.givenName()); contact.setMiddleName(addr.additionalName()); contact.setNameTitle(addr.prefix()); contact.setSuffix(addr.suffix()); contact.setFileAs(); // email QStringList emails = addr.emails(); for ( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) { contact.insertEmail(*it); } contact.setDefaultEmail( addr.preferredEmail() ); |