summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 2f9f1df..6522ccc 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2035,25 +2035,43 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList);
}
/* this method will be called through the QCop interface from other apps to show details of a contact.
*/
void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid)
{
//qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
QString foundUid = QString::null;
- if (uid.isEmpty())
+ if ( ! uid.isEmpty() ) {
+ Addressee adrr = mAddressBook->findByUid( uid );
+ if ( !adrr.isEmpty() ) {
+ foundUid = uid;
+ if ( email == "sendbacklist" ) {
+ QStringList nameList;
+ QStringList emailList;
+ QStringList uidList;
+ nameList.append(adrr.realName());
+ emailList = adrr.emails();
+ uidList.append( adrr.preferredEmail());
+ bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
+ }
+ }
+ }
+
+ if ( email == "sendback" )
+ return;
+ if (foundUid.isEmpty())
{
//find the uid of the person first
Addressee::List namelist;
Addressee::List emaillist;
if (!name.isEmpty())
namelist = mAddressBook->findByName( name );
if (!email.isEmpty())
emaillist = mAddressBook->findByEmail( email );
qDebug("count %d %d ", namelist.count(),emaillist.count() );
//check if we have a match in Namelist and Emaillist