-rw-r--r-- | kabc/addresseeview.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index af149a0..0564e85 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp | |||
@@ -85,49 +85,48 @@ void AddresseeView::setSource(const QString& n) | |||
85 | else if ( n.left( 5 ) == "sipto" ) | 85 | else if ( n.left( 5 ) == "sipto" ) |
86 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); | 86 | ExternalAppHandler::instance()->callBySIP( n.mid(6) ); |
87 | 87 | ||
88 | } | 88 | } |
89 | void AddresseeView::setAddressee( const KABC::Addressee& addr ) | 89 | void AddresseeView::setAddressee( const KABC::Addressee& addr ) |
90 | { | 90 | { |
91 | ExternalAppHandler* eah = ExternalAppHandler::instance(); | 91 | ExternalAppHandler* eah = ExternalAppHandler::instance(); |
92 | bool kemailAvail = eah->isEmailAppAvailable(); | 92 | bool kemailAvail = eah->isEmailAppAvailable(); |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
96 | mAddressee = addr; | 96 | mAddressee = addr; |
97 | // clear view | 97 | // clear view |
98 | setText( QString::null ); | 98 | setText( QString::null ); |
99 | 99 | ||
100 | if ( mAddressee.isEmpty() ) | 100 | if ( mAddressee.isEmpty() ) |
101 | return; | 101 | return; |
102 | 102 | ||
103 | QString name = ( mAddressee.assembledName().isEmpty() ? | 103 | QString name = ( mAddressee.assembledName().isEmpty() ? |
104 | mAddressee.formattedName() : mAddressee.assembledName() ); | 104 | mAddressee.formattedName() : mAddressee.assembledName() ); |
105 | 105 | ||
106 | QString dynamicPart; | 106 | QString dynamicPart; |
107 | 107 | ||
108 | dynamicPart += getPhoneNumbers( true ); | 108 | dynamicPart += getPhoneNumbers( true ); |
109 | qDebug("dynamic preferred %s ",dynamicPart.latin1() ); | ||
110 | QStringList emails = mAddressee.emails(); | 109 | QStringList emails = mAddressee.emails(); |
111 | QStringList::ConstIterator emailIt; | 110 | QStringList::ConstIterator emailIt; |
112 | QString type = i18n( "Email" ); | 111 | QString type = i18n( "Email" ); |
113 | emailIt = emails.begin(); | 112 | emailIt = emails.begin(); |
114 | if ( emailIt != emails.end() ) { | 113 | if ( emailIt != emails.end() ) { |
115 | if ( kemailAvail ) { | 114 | if ( kemailAvail ) { |
116 | dynamicPart += QString( | 115 | dynamicPart += QString( |
117 | "<tr><td align=\"right\"><b>%1</b></td>" | 116 | "<tr><td align=\"right\"><b>%1</b></td>" |
118 | "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) | 117 | "<td align=\"left\"><a href=\"mailto:%2 <%3> \">%4</a></td></tr>" ) |
119 | .arg( type ) | 118 | .arg( type ) |
120 | .arg( name ) | 119 | .arg( name ) |
121 | .arg( *emailIt ) | 120 | .arg( *emailIt ) |
122 | .arg( *emailIt ); | 121 | .arg( *emailIt ); |
123 | ++emailIt; | 122 | ++emailIt; |
124 | } else { | 123 | } else { |
125 | dynamicPart += QString( | 124 | dynamicPart += QString( |
126 | "<tr><td align=\"right\"><b>%1</b></td>" | 125 | "<tr><td align=\"right\"><b>%1</b></td>" |
127 | "<td align=\"left\">%2</td></tr>" ) | 126 | "<td align=\"left\">%2</td></tr>" ) |
128 | .arg( type ) | 127 | .arg( type ) |
129 | .arg( *emailIt ); | 128 | .arg( *emailIt ); |
130 | ++emailIt; | 129 | ++emailIt; |
131 | } | 130 | } |
132 | } | 131 | } |
133 | if ( mAddressee.birthday().date().isValid() ) { | 132 | if ( mAddressee.birthday().date().isValid() ) { |