-rw-r--r-- | kaddressbook/nameeditdialog.cpp | 7 |
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 ) | |||
238 | case ReverseName: | 238 | case ReverseName: |
239 | retval = addr.familyName() + ", " + addr.givenName(); | 239 | if ( !addr.familyName().isEmpty() ) { |
240 | retval = addr.familyName(); | ||
241 | if ( !addr.givenName().isEmpty() ) | ||
242 | retval += ", " + addr.givenName(); | ||
243 | } else | ||
244 | retval = addr.givenName(); | ||
240 | break; | 245 | break; |