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 | |||
@@ -227,8 +227,9 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) | |||
227 | { | 227 | { |
228 | QString retval; | ||
228 | switch ( type ) { | 229 | switch ( type ) { |
229 | case SimpleName: | 230 | case SimpleName: |
230 | return addr.givenName() + " " + addr.familyName(); | 231 | retval = addr.givenName() + " " + addr.familyName(); |
231 | break; | 232 | break; |
232 | case FullName: | 233 | case FullName: |
233 | return addr.prefix() + " " + addr.givenName() + " " + | 234 | retval =addr.prefix() + " " + addr.givenName() + " " + |
234 | addr.additionalName() + " " + addr.familyName() + " " + | 235 | addr.additionalName() + " " + addr.familyName() + " " + |
@@ -237,3 +238,3 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) | |||
237 | case ReverseName: | 238 | case ReverseName: |
238 | return addr.familyName() + ", " + addr.givenName(); | 239 | retval = addr.familyName() + ", " + addr.givenName(); |
239 | break; | 240 | break; |
@@ -243,2 +244,3 @@ QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) | |||
243 | } | 244 | } |
245 | return retval.stripWhiteSpace (); | ||
244 | } | 246 | } |