author | zautrix <zautrix> | 2005-01-14 19:02:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-14 19:02:53 (UTC) |
commit | 620f8de219ee34c209960f02c8296c0568dd5d8b (patch) (side-by-side diff) | |
tree | 772170b3b9ceaf8c204e2bdd9cbb333427de30cd /kaddressbook/nameeditdialog.cpp | |
parent | 61c95ce0295f1397db6499c5b468a9fb3d32a0f4 (diff) | |
download | kdepimpi-620f8de219ee34c209960f02c8296c0568dd5d8b.zip kdepimpi-620f8de219ee34c209960f02c8296c0568dd5d8b.tar.gz kdepimpi-620f8de219ee34c209960f02c8296c0568dd5d8b.tar.bz2 |
formatted name fixes
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 (); } |