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.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 4299ebd..2f9f1df 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2046,59 +2046,62 @@ void KABCore::requestForDetails(const QString& sourceChannel, const QString& ses
QString foundUid = QString::null;
if (uid.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
- if ((namelist.count() == 0) && (emaillist.count() > 0))
- foundUid == emaillist[0].uid();
+ if ((namelist.count() == 0) && (emaillist.count() > 0)) {
+ foundUid = emaillist[0].uid();
+ }
else if ((namelist.count() > 0) && (emaillist.count() == 0))
- foundUid == namelist[0].uid();
+ foundUid = namelist[0].uid();
else
{
for (int i = 0; i < namelist.count(); i++)
{
for (int j = 0; j < emaillist.count(); j++)
{
if (namelist[i] == emaillist[j])
{
- foundUid == namelist[i].uid();
+ foundUid = namelist[i].uid();
}
}
}
}
}
else
{
foundUid = uid;
}
if (!foundUid.isEmpty())
{
+
// raise Ka/Pi if it is in the background
#ifndef DESKTOP_VERSION
#ifndef KORG_NODCOP
- QCopEnvelope e("QPE/Application/kapi", "raise()");
+ //QCopEnvelope e("QPE/Application/kapi", "raise()");
#endif
#endif
mMainWindow->showMaximized();
+ mMainWindow-> raise();
mViewManager->setSelected( "", false);
mViewManager->refreshView( "" );
mViewManager->setSelected( foundUid, true );
mViewManager->refreshView( foundUid );
if ( !mMultipleViewsAtOnce )
{
setDetailsVisible( true );
mActionDetails->setChecked(true);
}
}