-rw-r--r-- | kabc/addresseeview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index aae923c..5c24acf 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp @@ -131,39 +131,41 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) //setText( QString::null ); mCurrentContact = mAddressee; if ( mAddressee.isEmpty() ) { setText( QString::null); return; } #if 0 QString name = ( mAddressee.assembledName().isEmpty() ? mAddressee.formattedName() : mAddressee.assembledName() ); #endif QString name = mAddressee.realName(); - + QString assName = mAddressee.assembledName(); + if ( assName.isEmpty() ) + assName = name; QString dynamicPart; dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(),true ); QStringList emails = mAddressee.emails(); QStringList::ConstIterator emailIt; QString type = i18n( "Email" ); emailIt = emails.begin(); if ( emailIt != emails.end() ) { if ( kemailAvail ) { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) .arg( type ) - .arg( name ) + .arg( assName ) .arg( *emailIt ) .arg( *emailIt ); ++emailIt; } else { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\">%2</td></tr>" ) .arg( type ) .arg( *emailIt ); ++emailIt; } } |