Diffstat (limited to 'kaddressbook/nameeditdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/nameeditdialog.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index 8213c2b..f5dba0f 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp @@ -227,8 +227,9 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) { + QString retval; switch ( type ) { case SimpleName: - return addr.givenName() + " " + addr.familyName(); + retval = addr.givenName() + " " + addr.familyName(); break; case FullName: - return addr.prefix() + " " + addr.givenName() + " " + + retval =addr.prefix() + " " + addr.givenName() + " " + addr.additionalName() + " " + addr.familyName() + " " + @@ -237,3 +238,3 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) case ReverseName: - return addr.familyName() + ", " + addr.givenName(); + retval = addr.familyName() + ", " + addr.givenName(); break; @@ -243,2 +244,3 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) } + return retval.stripWhiteSpace (); } |