summaryrefslogtreecommitdiff
path: root/libopie/pim/ocontactaccessbackend_xml.h
Unidiff
Diffstat (limited to 'libopie/pim/ocontactaccessbackend_xml.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontactaccessbackend_xml.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/libopie/pim/ocontactaccessbackend_xml.h b/libopie/pim/ocontactaccessbackend_xml.h
index 97ef40f..50ea329 100644
--- a/libopie/pim/ocontactaccessbackend_xml.h
+++ b/libopie/pim/ocontactaccessbackend_xml.h
@@ -18,4 +18,7 @@
18 * History: 18 * History:
19 * $Log$ 19 * $Log$
20 * Revision 1.3 2002/10/14 16:21:54 eilers
21 * Some minor interface updates
22 *
20 * Revision 1.2 2002/10/07 17:34:24 eilers 23 * Revision 1.2 2002/10/07 17:34:24 eilers
21 * added OBackendFactory for advanced backend access 24 * added OBackendFactory for advanced backend access
@@ -200,8 +203,8 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
200 /* Just compare fields which are not empty in the query object */ 203 /* Just compare fields which are not empty in the query object */
201 if ( !query.field(i).isEmpty() ){ 204 if ( !query.field(i).isEmpty() ){
202 switch ( settings & ~OContactAccess::query_IgnoreCase ){ 205 switch ( settings & ~OContactAccess::IgnoreCase ){
203 case OContactAccess::query_RegExp:{ 206 case OContactAccess::RegExp:{
204 QRegExp expr ( query.field(i), 207 QRegExp expr ( query.field(i),
205 !(settings & OContactAccess::query_IgnoreCase), 208 !(settings & OContactAccess::IgnoreCase),
206 false ); 209 false );
207 if ( expr.find ( (*it).field(i), 0 ) == -1 ) 210 if ( expr.find ( (*it).field(i), 0 ) == -1 )
@@ -209,7 +212,7 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
209 } 212 }
210 break; 213 break;
211 case OContactAccess::query_WildCards:{ 214 case OContactAccess::WildCards:{
212 QRegExp expr ( query.field(i), 215 QRegExp expr ( query.field(i),
213 !(settings & OContactAccess::query_IgnoreCase), 216 !(settings & OContactAccess::IgnoreCase),
214 true ); 217 true );
215 if ( expr.find ( (*it).field(i), 0 ) == -1 ) 218 if ( expr.find ( (*it).field(i), 0 ) == -1 )
@@ -217,6 +220,6 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
217 } 220 }
218 break; 221 break;
219 case OContactAccess::query_ExactMatch:{ 222 case OContactAccess::ExactMatch:{
220 if (settings & OContactAccess::query_IgnoreCase){ 223 if (settings & OContactAccess::IgnoreCase){
221 if ( query.field(i).upper() != 224 if ( query.field(i).upper() !=
222 (*it).field(i).upper() ) 225 (*it).field(i).upper() )
@@ -244,22 +247,22 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
244 const uint querySettings() 247 const uint querySettings()
245 { 248 {
246 return ( OContactAccess::query_WildCards 249 return ( OContactAccess::WildCards
247 & OContactAccess::query_IgnoreCase 250 & OContactAccess::IgnoreCase
248 & OContactAccess::query_RegExp 251 & OContactAccess::RegExp
249 & OContactAccess::query_ExactMatch ); 252 & OContactAccess::ExactMatch );
250 } 253 }
251 254
252 bool hasQuerySettings (uint querySettings) const 255 bool hasQuerySettings (uint querySettings) const
253 { 256 {
254 /* OContactAccess::query_IgnoreCase may be added with one 257 /* OContactAccess::IgnoreCase may be added with one
255 * of the other settings, but never used alone. 258 * of the other settings, but never used alone.
256 * The other settings are just valid alone... 259 * The other settings are just valid alone...
257 */ 260 */
258 switch ( querySettings & ~OContactAccess::query_IgnoreCase ){ 261 switch ( querySettings & ~OContactAccess::IgnoreCase ){
259 case OContactAccess::query_RegExp: 262 case OContactAccess::RegExp:
260 return ( true ); 263 return ( true );
261 case OContactAccess::query_WildCards: 264 case OContactAccess::WildCards:
262 return ( true ); 265 return ( true );
263 case OContactAccess::query_ExactMatch: 266 case OContactAccess::ExactMatch:
264 return ( true ); 267 return ( true );
265 default: 268 default: