summaryrefslogtreecommitdiffabout
path: root/kabc/addresseeview.cpp
Side-by-side diff
Diffstat (limited to 'kabc/addresseeview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addresseeview.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index 90be928..7a4336b 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -87,18 +87,15 @@ void AddresseeView::setSource(const QString& n)
}
-void AddresseeView::setAddressee( const KABC::Addressee& addr )
+void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
{
- ExternalAppHandler* eah = ExternalAppHandler::instance();
- bool kemailAvail = eah->isEmailAppAvailable();
-
-
-
- mAddressee = addr;
+ bool kemailAvail = ExternalAppHandler::instance()->isEmailAppAvailable();
+ // mAddressee = addr;
// clear view
- setText( QString::null );
+ //setText( QString::null );
- if ( mAddressee.isEmpty() )
+ if ( mAddressee.isEmpty() ) {
+ setText( QString::null);
return;
-
+ }
QString name = ( mAddressee.assembledName().isEmpty() ?
mAddressee.formattedName() : mAddressee.assembledName() );
@@ -106,5 +103,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
QString dynamicPart;
- dynamicPart += getPhoneNumbers( true );
+ dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(),true );
QStringList emails = mAddressee.emails();
QStringList::ConstIterator emailIt;
@@ -137,5 +134,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& addr )
.arg( KGlobal::locale()->formatDate( mAddressee.birthday().date() ,true) );
}
- dynamicPart += getPhoneNumbers( false );
+ dynamicPart += getPhoneNumbers( mAddressee.phoneNumbers(), false );
for ( ; emailIt != emails.end(); ++emailIt ) {
@@ -309,5 +306,5 @@ mText = "<table width=\"100%\">\n";
}
-QString AddresseeView::getPhoneNumbers( bool preferred )
+QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones ,bool preferred )
{
ExternalAppHandler* eah = ExternalAppHandler::instance();
@@ -318,5 +315,4 @@ QString AddresseeView::getPhoneNumbers( bool preferred )
bool ksipAvail = eah->isSIPAppAvailable();
QString dynamicPart;
- KABC::PhoneNumber::List phones = mAddressee.phoneNumbers();
KABC::PhoneNumber::List::ConstIterator phoneIt;
QString extension;
@@ -378,8 +374,10 @@ QString AddresseeView::getPhoneNumbers( bool preferred )
return dynamicPart;
}
+/*
KABC::Addressee AddresseeView::addressee() const
{
return mAddressee;
}
+*/
void AddresseeView::addTag(const QString & tag,const QString & text)
{