From 28b70b2b7f8fa03ba0991fb73dccf7b46e5c3d1f Mon Sep 17 00:00:00 2001 From: eilers Date: Fri, 01 Nov 2002 15:10:42 +0000 Subject: Added regExp-search in database for all fields in a contact. --- (limited to 'libopie/pim/ocontactaccessbackend_xml.h') diff --git a/libopie/pim/ocontactaccessbackend_xml.h b/libopie/pim/ocontactaccessbackend_xml.h index 12a75ba..f7e8207 100644 --- a/libopie/pim/ocontactaccessbackend_xml.h +++ b/libopie/pim/ocontactaccessbackend_xml.h @@ -17,6 +17,9 @@ * ===================================================================== * History: * $Log$ + * Revision 1.5 2002/11/01 15:10:42 eilers + * Added regExp-search in database for all fields in a contact. + * * Revision 1.4 2002/10/16 10:52:40 eilers * Added some docu to the interface and now using the cache infrastucture by zecke.. :) * @@ -254,6 +257,23 @@ class OContactAccessBackend_XML : public OContactAccessBackend { return m_currentQuery; } + + QArray matchRegexp( const QRegExp &r ) const{ + QArray m_currentQuery( m_contactList.count() ); + QValueListConstIterator it; + uint arraycounter = 0; + + for( it = m_contactList.begin(); it != m_contactList.end(); ++it ){ + if ( (*it).match( r ) ){ + m_currentQuery[arraycounter++] = (*it).uid(); + } + + } + // Shrink to fit.. + m_currentQuery.resize(arraycounter); + + return m_currentQuery; + } const uint querySettings() { -- cgit v0.9.0.2