author | zautrix <zautrix> | 2004-09-07 18:13:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-07 18:13:35 (UTC) |
commit | 9d5c8750ae671e73ec8ebc0a71f30fd30680f2c0 (patch) (side-by-side diff) | |
tree | 57644161d6aa1bb0820a5fff0330568db50806f4 /libkdepim | |
parent | dd1e64eda9500a424d83738db5cd5f7a7a208e3b (diff) | |
download | kdepimpi-9d5c8750ae671e73ec8ebc0a71f30fd30680f2c0.zip kdepimpi-9d5c8750ae671e73ec8ebc0a71f30fd30680f2c0.tar.gz kdepimpi-9d5c8750ae671e73ec8ebc0a71f30fd30680f2c0.tar.bz2 |
bigfix in addresseeview
-rw-r--r-- | libkdepim/addresseeview.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index 5c4f538..d710541 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -102,106 +102,108 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr ) QString dynamicPart; 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( *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; } } KABC::PhoneNumber::List phones = mAddressee.phoneNumbers(); KABC::PhoneNumber::List::ConstIterator phoneIt; QString extension; int phonetype; QString sms; for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) { phonetype = (*phoneIt).type(); if (ksmsAvail && ( ((phonetype & KABC::PhoneNumber::Car) == KABC::PhoneNumber::Car) || ((phonetype & KABC::PhoneNumber::Cell) == KABC::PhoneNumber::Cell) ) ) { sms = QString("<a href=\"smsto:%1 \">(sms)</a>" ) .arg( (*phoneIt).number() ); } else sms = ""; extension = QString::null; - if ((phonetype & KABC::PhoneNumber::Fax) == KABC::PhoneNumber::Fax) + if ((phonetype & KABC::PhoneNumber::Fax) == KABC::PhoneNumber::Fax) { if (kfaxAvail) extension = "faxto:"; - else if ((phonetype & KABC::PhoneNumber::Pager) == KABC::PhoneNumber::Pager) + } + else if ((phonetype & KABC::PhoneNumber::Pager) == KABC::PhoneNumber::Pager) { if (kpagerAvail) extension = "pagerto:"; - else if (kphoneAvail) + } + else if (kphoneAvail) { extension = "phoneto:"; + } else extension = QString::null; - if ( !extension.isEmpty() ) { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\"><a href=\"%2%3 \">%4</a> %5</td></tr>" ) .arg( KABC::PhoneNumber::typeLabel( phonetype ) ) .arg( extension ) .arg( (*phoneIt).number() ) .arg( (*phoneIt).number() ) .arg( sms ); } else { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\">%2 %3</td></tr>" ) .arg( KABC::PhoneNumber::typeLabel( phonetype ) ) .arg( (*phoneIt).number() ) .arg( sms ); } } for ( ; emailIt != emails.end(); ++emailIt ) { 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( *emailIt ) .arg( *emailIt ); } else { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\">%2</td></tr>" ) .arg( type ) .arg( *emailIt ); } } if ( !mAddressee.url().url().isEmpty() ) { dynamicPart += QString( "<tr><td align=\"right\"><b>%1</b></td>" "<td align=\"left\">%2</td></tr>" ) .arg( i18n( "Homepage" ) ) //US .arg( KStringHandler::tagURLs( mAddressee.url().url() ) ); .arg( mAddressee.url().url() ); //qDebug("AddresseeView::setAddressee has to be verified."); } |