summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-03 14:15:57 (UTC)
committer zautrix <zautrix>2005-06-03 14:15:57 (UTC)
commit0207d193bdb6c66201562a17e68872e018ec223c (patch) (side-by-side diff)
treec2b15d8acd9bdc7adee3d074551396d98599966f
parent7aa43257ffb63e772342f24c1f7945e285171ee6 (diff)
downloadkdepimpi-0207d193bdb6c66201562a17e68872e018ec223c.zip
kdepimpi-0207d193bdb6c66201562a17e68872e018ec223c.tar.gz
kdepimpi-0207d193bdb6c66201562a17e68872e018ec223c.tar.bz2
formateed name fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/nameeditdialog.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp
index f5dba0f..199f3d6 100644
--- a/kaddressbook/nameeditdialog.cpp
+++ b/kaddressbook/nameeditdialog.cpp
@@ -238,3 +238,8 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type )
case ReverseName:
- retval = addr.familyName() + ", " + addr.givenName();
+ if ( !addr.familyName().isEmpty() ) {
+ retval = addr.familyName();
+ if ( !addr.givenName().isEmpty() )
+ retval += ", " + addr.givenName();
+ } else
+ retval = addr.givenName();
break;