summaryrefslogtreecommitdiffabout
path: root/kabc
Side-by-side diff
Diffstat (limited to 'kabc') (more/less context) (show whitespace changes)
-rw-r--r--kabc/converter/opie/opieconverter.cpp33
1 files changed, 23 insertions, 10 deletions
diff --git a/kabc/converter/opie/opieconverter.cpp b/kabc/converter/opie/opieconverter.cpp
index cfbe5c0..d785fbc 100644
--- a/kabc/converter/opie/opieconverter.cpp
+++ b/kabc/converter/opie/opieconverter.cpp
@@ -158,5 +158,2 @@ bool OpieConverter::opieToAddressee( OContact &contact, Addressee &addr )
-//???
-//US QString businessWebpage() const { return find( Qtopia::BusinessWebPage ); }
-
//personal
@@ -165,2 +162,3 @@ bool OpieConverter::opieToAddressee( OContact &contact, Addressee &addr )
+ if (contact.anniversary().isValid()) {
int orgformat = KGlobal::locale()->getIntDateFormat();
@@ -168,12 +166,23 @@ bool OpieConverter::opieToAddressee( OContact &contact, Addressee &addr )
QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true);
+//US
+ qDebug("OpieConverter::opieToAddressee found:%s", dt.latin1());
KGlobal::locale()->setIntDateFormat(orgformat );
addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
+ }
addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() );
+ if (contact.birthday().isValid())
addr.setBirthday( contact.birthday() );
+
addr.setNickName( contact.nickname() );
- // other
+ // 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 ); }
@@ -181,3 +190,3 @@ bool OpieConverter::opieToAddressee( OContact &contact, Addressee &addr )
-/*US
+
QStringList cats = contact.categoryNames("Contacts");
@@ -186,3 +195,4 @@ bool OpieConverter::opieToAddressee( OContact &contact, Addressee &addr )
}
-*/
+
+
addr.setCategories( contact.categoryNames("Contacts") );
@@ -313,5 +323,7 @@ bool OpieConverter::addresseeToOpie( const Addressee &addr, OContact &contact )
*/
-/*US
+
Categories catDB;
- catDB.load( contact.categoryFileName() );
+ catDB.dump();
+//US catDB.load( contact.categoryFileName() );
+ catDB.load( "contact" );
@@ -319,5 +331,6 @@ bool OpieConverter::addresseeToOpie( const Addressee &addr, OContact &contact )
for ( QStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) {
- contact.setCategories(catDB.id(*it));
+ qDebug("categories: %s", (*it).latin1());
+// contact.setCategories(catDB.id(*it));
}
-*/
+