summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
authoreilers <eilers>2004-04-05 07:03:09 (UTC)
committer eilers <eilers>2004-04-05 07:03:09 (UTC)
commite6e31e93aa55bb967a044fe3660201000a6e59b0 (patch) (unidiff)
tree1071fa4b22698fd56dde283bbb7375478b7e1ddf /libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
parent6be3d148fc1d610ebfa193012657b3b77d9368e3 (diff)
downloadopie-e6e31e93aa55bb967a044fe3660201000a6e59b0.zip
opie-e6e31e93aa55bb967a044fe3660201000a6e59b0.tar.gz
opie-e6e31e93aa55bb967a044fe3660201000a6e59b0.tar.bz2
SQL-Backends are almost finished !
Works: Loading/Storing data, Most important search queries for Address/todo Unfinished: Search-Queries for Datebook, regexp search
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
index 2b467c3..7b4d81f 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp
@@ -221,24 +221,25 @@ QArray<int> OPimContactAccessBackend_XML::queryByExample ( const OPimContact &qu
221 * if all fields matches. 221 * if all fields matches.
222 */ 222 */
223 QDate* queryDate = 0l; 223 QDate* queryDate = 0l;
224 QDate* checkDate = 0l; 224 QDate* checkDate = 0l;
225 bool allcorrect = true; 225 bool allcorrect = true;
226 for ( int i = 0; i < Qtopia::Groups; i++ ) { 226 for ( int i = 0; i < Qtopia::Groups; i++ ) {
227 // Birthday and anniversary are special nonstring fields and should 227 // Birthday and anniversary are special nonstring fields and should
228 // be handled specially 228 // be handled specially
229 switch ( i ){ 229 switch ( i ){
230 case Qtopia::Birthday: 230 case Qtopia::Birthday:
231 queryDate = new QDate( query.birthday() ); 231 queryDate = new QDate( query.birthday() );
232 checkDate = new QDate( (*it)->birthday() ); 232 checkDate = new QDate( (*it)->birthday() );
233 // fall through
233 case Qtopia::Anniversary: 234 case Qtopia::Anniversary:
234 if ( queryDate == 0l ){ 235 if ( queryDate == 0l ){
235 queryDate = new QDate( query.anniversary() ); 236 queryDate = new QDate( query.anniversary() );
236 checkDate = new QDate( (*it)->anniversary() ); 237 checkDate = new QDate( (*it)->anniversary() );
237 } 238 }
238 239
239 if ( queryDate->isValid() ){ 240 if ( queryDate->isValid() ){
240 if( checkDate->isValid() ){ 241 if( checkDate->isValid() ){
241 if ( settings & OPimContactAccess::DateYear ){ 242 if ( settings & OPimContactAccess::DateYear ){
242 if ( queryDate->year() != checkDate->year() ) 243 if ( queryDate->year() != checkDate->year() )
243 allcorrect = false; 244 allcorrect = false;
244 } 245 }