From cecffa1dc3a7bd1526be00e7bc4a4a151e6f2c9c Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 27 Jun 2005 18:08:35 +0000 Subject: -Fix compile warning (signed vs unsigned) -Somehow the split up patches missed the query string... (I knew I would mess up) --- (limited to 'libopie2') diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp index 6aaa14c..f684f8c 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_sql.cpp @@ -648,7 +648,7 @@ UIDArray OPimContactAccessBackend_SQL::queryByExample ( const UIDArray& uidlist, // The following if line is a replacement for // if ( searchQuery.endsWith( "AND" ) ) - if ( searchQuery.findRev( "AND" ) == ( searchQuery.length() - 3 ) ){ + if ( searchQuery.findRev( "AND" ) == static_cast( searchQuery.length() - 3 ) ){ odebug << "remove AND" << oendl; searchQuery.remove( searchQuery.length()-3, 3 ); // Hmmmm.. } @@ -873,6 +873,12 @@ UIDArray OPimContactAccessBackend_SQL::sorted( const UIDArray& ar, bool asc, int case OPimContactAccess::SortGender: query += " \"Gender\""; break; + case OPimContactAccess::SortBirthdayWithoutYear: + query += " substr(\"Birthday\", 6, 10)"; + break; + case OPimContactAccess::SortAnniversaryWithoutYear: + query += " substr(\"Anniversary\", 6, 10)"; + break; default: query += " \"Last Name\""; } -- cgit v0.9.0.2