summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.cpp b/libopie2/opiepim/backend/ocontactaccessbackend.cpp
index b4fdd46..c09427c 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend.cpp
@@ -1,27 +1,28 @@
/*
This file is part of the Opie Project
- Copyright (C) 2004 Holger Freyther <freyther@handhelds.org>
+ Copyright (C) Holger Freyther <freyther@handhelds.org>
+ Copyright (C) Stefan Eilers <stefan@eilers-online.net>
=. Copyright (C) The Opie Team <opie-devel@handhelds.org>
.=l.
.>+-=
_;:, .> :=|. This program is free software; you can
.> <`_, > . <= redistribute it and/or modify it under
:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
.="- .-=="i, .._ License as published by the Free Software
- . .-<_> .<> Foundation; either version 2 of the License,
._= =} : or (at your option) any later version.
.%`+i> _;_.
.i_,=:_. -<s. This program is distributed in the hope that
+ . -:. = it will be useful, but WITHOUT ANY WARRANTY;
: .. .:, . . . without even the implied warranty of
=_ + =;=|` MERCHANTABILITY or FITNESS FOR A
_.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.= = ; Library General Public License for more
++= -. .` .: details.
: = ...= . :.=-
-. .:....=;==+<; You should have received a copy of the GNU
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@@ -216,49 +217,49 @@ bool OPimContactAccessBackend::hasQuerySettings (uint querySettings) const
// WildCards, RegExp and ExactMatch should never used at the same time
switch ( querySettings & ~( OPimContactAccess::IgnoreCase
| OPimContactAccess::DateDiff
| OPimContactAccess::DateYear
| OPimContactAccess::DateMonth
| OPimContactAccess::DateDay
)
){
case OPimContactAccess::RegExp:
return ( true );
case OPimContactAccess::WildCards:
return ( true );
case OPimContactAccess::ExactMatch:
return ( true );
case 0: // one of the upper removed bits were set..
return ( true );
default:
return ( false );
}
}
UIDArray OPimContactAccessBackend::sorted( const UIDArray& ar, bool asc, int sortOrder,
- int filter, const QArray<int>& categories)const {
+ int filter, const QArray<int>& categories )const {
odebug << "Using Unaccelerated OPimContactAccessBackend sorted Implementation" << oendl;
Internal::OPimContactSortVector vector(ar.count(), asc, sortOrder );
int item = 0;
uint cat_count = categories.count();
uint eve_count = ar.count();
bool bCat = filter & OPimContactAccess::FilterCategory ? true : false;
bool catPassed = false;
int cat;
for ( uint i = 0; i < eve_count; ++i ) {
OPimContact contact = find( ar[i], ar, i, Frontend::Forward );
if ( contact.isEmpty() )
continue;
/* show category */
/* -1 == unfiled */
catPassed = false;
for ( uint cat_nu = 0; cat_nu < cat_count; ++cat_nu ) {
cat = categories[cat_nu];
if ( bCat && cat == -1 ) {
if(!contact.categories().isEmpty() )
continue;