summaryrefslogtreecommitdiffabout
path: root/kabc/converter
Unidiff
Diffstat (limited to 'kabc/converter') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/converter/opie/opieconverter.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/kabc/converter/opie/opieconverter.cpp b/kabc/converter/opie/opieconverter.cpp
index 0b6a55e..46e14dd 100644
--- a/kabc/converter/opie/opieconverter.cpp
+++ b/kabc/converter/opie/opieconverter.cpp
@@ -200,7 +200,10 @@ bool OpieConverter::opieToAddressee( const OContact &contact, Addressee &addr )
200 200
201 //personal 201 //personal
202 addr.insertCustom( "KADDRESSBOOK", "X-SpousesName", contact.spouse() ); 202 addr.insertCustom( "KADDRESSBOOK", "X-SpousesName", contact.spouse() );
203 addr.insertCustom( "KADDRESSBOOK", "X-Gender", contact.gender() ); 203 if (contact.gender() == 1)
204 addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female" );
205 else if (contact.gender() == 2)
206 addr.insertCustom( "KADDRESSBOOK", "X-Gender", "male" );
204 207
205 if (contact.anniversary().isValid()) { 208 if (contact.anniversary().isValid()) {
206 QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate); 209 QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate);
@@ -319,8 +322,12 @@ bool OpieConverter::addresseeToOpie( const Addressee &addr, OContact &contact )
319 322
320 //personal 323 //personal
321 contact.setSpouse(addr.custom( "KADDRESSBOOK", "X-Spouse" )); 324 contact.setSpouse(addr.custom( "KADDRESSBOOK", "X-Spouse" ));
322 contact.setGender(addr.custom( "KADDRESSBOOK", "X-Gender" )); 325 QString gend = addr.custom( "KADDRESSBOOK", "X-Gender" );
323 326 if (gend == "female")
327 contact.setGender("1");
328 else if (gend == "male")
329 contact.setGender("2");
330
324 QDate dt = KGlobal::locale()->readDate( 331 QDate dt = KGlobal::locale()->readDate(
325 addr.custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); // = Qt::ISODate 332 addr.custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); // = Qt::ISODate
326 contact.setAnniversary( dt ); 333 contact.setAnniversary( dt );