Diffstat (limited to 'kaddressbook/nameeditdialog.cpp') (more/less context) (ignore 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 @@ -226,15 +226,16 @@ bool NameEditDialog::changed() const 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() + " " + addr.suffix(); break; case ReverseName: - return addr.familyName() + ", " + addr.givenName(); + retval = addr.familyName() + ", " + addr.givenName(); break; default: @@ -242,4 +243,5 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) break; } + return retval.stripWhiteSpace (); } |