[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [Bug 110867] Search/Find button for LDAP lookups in composer
From:       Christian Schaarschmidt <schaarsc () gmx ! de>
Date:       2007-02-23 19:53:02
Message-ID: 20070223195302.31781.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=110867         




------- Additional Comments From schaarsc gmx de  2007-02-23 20:53 -------
SVN commit 636670 by schaarsc:

- fix broken ldapSearch
- lookup domain in ldapSearch (kmailcompletion already does)
- do not load all contacts from ldapkio, use ldapSearch instead
- do not reload local contacts  with each ldapSearch (implies contact caching)
CCBUG: 110867


 M  +6 -4      branches/work/kdepim-3.5.5+/libkdepim/addresseelineedit.cpp  
 M  +2 -2      branches/work/kdepim-3.5.5+/libkdepim/ldapclient.cpp  


--- branches/work/kdepim-3.5.5+/libkdepim/addresseelineedit.cpp #636669:636670
 @ -99,6 +99,7  @
   m_completionInitialized = false;
   m_smartPaste = false;
   m_addressBookConnected = false;
+  m_searchExtended = false;
 
   init();
 
 @ -524,8 +525,9  @
       int weight = config.readNumEntry( resource->identifier(), 60 );
       s_completionSources->append( resource->resourceName() );
       KABC::Resource::Iterator it;
-      for ( it = resource->begin(); it != resource->end(); ++it )
-        addContact( *it, weight, s_completionSources->size()-1 );
+      if ( resource->type() != "ldapkio" )
+        for ( it = resource->begin(); it != resource->end(); ++it )
+          addContact( *it, weight, s_completionSources->size()-1 );
     }
   }
 
 @ -633,7 +635,7  @
 
     keyWords.append( email );
 
-    /* KMailCompletion does not have knowlege about identities, it stores emails and
+    /* KMailCompletion does not have knowledge about identities, it stores emails \
                and
      * keywords for each email. KMailCompletion::allMatches does a lookup on the
      * keywords and returns an ordered list of emails. In order to get the preferred
      * email before others for each identity we use this little trick.
 @ -744,7 +746,7  @
   if ( s.isEmpty() )
     return;
 
-  loadContacts(); // TODO reuse these?
+  //loadContacts(); // TODO reuse these?
   s_LDAPSearch->startSearch( s );
 }
 
--- branches/work/kdepim-3.5.5+/libkdepim/ldapclient.cpp #636669:636670
 @ -427,8 +427,8  @
    * This allows both resource accounts with an email address which are not a person \
                and
    * person entries without an email address to show up, while still not showing \
                things
    * like structural entries in the ldap tree. */
-  QString filter = QString( \
"&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(givenName=%3*)(sn=%4*))" \
                )
-      .arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText );
+  QString filter = QString( \
"&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(mail=* \
%3*)(givenName=%4*)(sn=%5*))" ) +      .arg( mSearchText ).arg( mSearchText ).arg( \
mSearchText ).arg( mSearchText ).arg( mSearchText );  
   QValueList< LdapClient* >::Iterator it;
   for ( it = mClients.begin(); it != mClients.end(); ++it ) {
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic