summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/converter/opie/opieconverter.cpp13
-rw-r--r--kaddressbook/kabcore.cpp3
2 files changed, 12 insertions, 4 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 )
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
@@ -321,4 +324,8 @@ bool OpieConverter::addresseeToOpie( const Addressee &addr, OContact &contact )
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(
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 1a34e4d..8daca33 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -165,3 +165,4 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
165 165
166//US added this field to become compatible with Opie addressbook 166 //US added this field to become compatible with Opie/qtopia addressbook
167 // values can be "female" or "male" or "". An empty field represents undefined.
167 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, 168 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal,