From 7b7c582bbb9908ec65c778b70baa6b2c2aa457fc Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 02 Jul 2005 12:29:31 +0000 Subject: Z 5500 fixes --- (limited to 'kabc') diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index 2691d9a..f3cfb23 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp @@ -234,11 +234,13 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) QString tempX = mAddressee.custom( "KADDRESSBOOK", "X-Gender" ); if ( !tempX.isEmpty() ) { - notes += QString( - "%1" - "%2" ) - .arg( i18n( "" ) ) - .arg( i18n(tempX) ); + if ( tempX == "male" || tempX == "female" ) { + notes += QString( + "%1" + "%2" ) + .arg( i18n( "" ) ) + .arg( i18n(tempX) ); + } } @@ -327,12 +329,14 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) tempX = mAddressee.custom( "KADDRESSBOOK", "X-Anniversary" ); if ( !tempX.isEmpty() ) { QDate dt = KGlobal::locale()->readDate( tempX, "%Y-%m-%d"); - tempX = KGlobal::locale()->formatDate(dt, true); - notes += QString( - "%1" - "%2" ) - .arg( i18n( "Anniversary" ) ) - .arg( tempX ); + if ( dt.isValid () ) { + tempX = KGlobal::locale()->formatDate(dt, true); + notes += QString( + "%1" + "%2" ) + .arg( i18n( "Anniversary" ) ) + .arg( tempX ); + } } tempX = mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ); if ( !tempX.isEmpty() ) { -- cgit v0.9.0.2