Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_xml.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_xml.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h index 12a75ba..f7e8207 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h | |||
@@ -17,6 +17,9 @@ | |||
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.5 2002/11/01 15:10:42 eilers | ||
21 | * Added regExp-search in database for all fields in a contact. | ||
22 | * | ||
20 | * Revision 1.4 2002/10/16 10:52:40 eilers | 23 | * Revision 1.4 2002/10/16 10:52:40 eilers |
21 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) | 24 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) |
22 | * | 25 | * |
@@ -255,6 +258,23 @@ class OContactAccessBackend_XML : public OContactAccessBackend { | |||
255 | return m_currentQuery; | 258 | return m_currentQuery; |
256 | } | 259 | } |
257 | 260 | ||
261 | QArray<int> matchRegexp( const QRegExp &r ) const{ | ||
262 | QArray<int> m_currentQuery( m_contactList.count() ); | ||
263 | QValueListConstIterator<OContact> it; | ||
264 | uint arraycounter = 0; | ||
265 | |||
266 | for( it = m_contactList.begin(); it != m_contactList.end(); ++it ){ | ||
267 | if ( (*it).match( r ) ){ | ||
268 | m_currentQuery[arraycounter++] = (*it).uid(); | ||
269 | } | ||
270 | |||
271 | } | ||
272 | // Shrink to fit.. | ||
273 | m_currentQuery.resize(arraycounter); | ||
274 | |||
275 | return m_currentQuery; | ||
276 | } | ||
277 | |||
258 | const uint querySettings() | 278 | const uint querySettings() |
259 | { | 279 | { |
260 | return ( OContactAccess::WildCards | 280 | return ( OContactAccess::WildCards |