summaryrefslogtreecommitdiffabout
path: root/kabc/converter
Side-by-side diff
Diffstat (limited to 'kabc/converter') (more/less context) (show whitespace changes)
-rw-r--r--kabc/converter/opie/opieconverter.cpp11
1 files changed, 9 insertions, 2 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
@@ -202,3 +202,6 @@ bool OpieConverter::opieToAddressee( const OContact &contact, Addressee &addr )
addr.insertCustom( "KADDRESSBOOK", "X-SpousesName", contact.spouse() );
- addr.insertCustom( "KADDRESSBOOK", "X-Gender", contact.gender() );
+ if (contact.gender() == 1)
+ addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female" );
+ else if (contact.gender() == 2)
+ addr.insertCustom( "KADDRESSBOOK", "X-Gender", "male" );
@@ -321,3 +324,7 @@ bool OpieConverter::addresseeToOpie( const Addressee &addr, OContact &contact )
contact.setSpouse(addr.custom( "KADDRESSBOOK", "X-Spouse" ));
- contact.setGender(addr.custom( "KADDRESSBOOK", "X-Gender" ));
+ QString gend = addr.custom( "KADDRESSBOOK", "X-Gender" );
+ if (gend == "female")
+ contact.setGender("1");
+ else if (gend == "male")
+ contact.setGender("2");