From 620f8de219ee34c209960f02c8296c0568dd5d8b Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 14 Jan 2005 19:02:53 +0000 Subject: formatted name fixes --- (limited to 'kaddressbook/nameeditdialog.cpp') diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index 8213c2b..f5dba0f 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp @@ -225,22 +225,24 @@ 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: return ""; break; } + return retval.stripWhiteSpace (); } void NameEditDialog::parseBoxChanged( bool value ) -- cgit v0.9.0.2