author | zautrix <zautrix> | 2005-07-02 12:29:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-02 12:29:31 (UTC) |
commit | 7b7c582bbb9908ec65c778b70baa6b2c2aa457fc (patch) (side-by-side diff) | |
tree | e1e1fb9e039f804d44317b5743ba5aae00fdcc9a /kabc | |
parent | 98273ae9af4d39181ace21fe3dfade141e5f8afb (diff) | |
download | kdepimpi-7b7c582bbb9908ec65c778b70baa6b2c2aa457fc.zip kdepimpi-7b7c582bbb9908ec65c778b70baa6b2c2aa457fc.tar.gz kdepimpi-7b7c582bbb9908ec65c778b70baa6b2c2aa457fc.tar.bz2 |
Z 5500 fixes
-rw-r--r-- | kabc/addresseeview.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index 2691d9a..f3cfb23 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp @@ -235,9 +235,11 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) QString tempX = mAddressee.custom( "KADDRESSBOOK", "X-Gender" ); if ( !tempX.isEmpty() ) { - notes += QString( - "<tr><td align=\"right\"><b>%1</b></td>" - "<td align=\"left\">%2</td></tr>" ) - .arg( i18n( "" ) ) - .arg( i18n(tempX) ); + if ( tempX == "male" || tempX == "female" ) { + notes += QString( + "<tr><td align=\"right\"><b>%1</b></td>" + "<td align=\"left\">%2</td></tr>" ) + .arg( i18n( "" ) ) + .arg( i18n(tempX) ); + } } @@ -328,10 +330,12 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) if ( !tempX.isEmpty() ) { QDate dt = KGlobal::locale()->readDate( tempX, "%Y-%m-%d"); - tempX = KGlobal::locale()->formatDate(dt, true); - notes += QString( - "<tr><td align=\"right\"><b>%1</b></td>" - "<td align=\"left\">%2</td></tr>" ) - .arg( i18n( "Anniversary" ) ) - .arg( tempX ); + if ( dt.isValid () ) { + tempX = KGlobal::locale()->formatDate(dt, true); + notes += QString( + "<tr><td align=\"right\"><b>%1</b></td>" + "<td align=\"left\">%2</td></tr>" ) + .arg( i18n( "Anniversary" ) ) + .arg( tempX ); + } } tempX = mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ); |