summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Side-by-side diff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore 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
@@ -237,5 +237,10 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type )
break;
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;
default: