author | eilers <eilers> | 2005-01-16 19:54:28 (UTC) |
---|---|---|
committer | eilers <eilers> | 2005-01-16 19:54:28 (UTC) |
commit | 37f290f048eeade1036cd1dc2239d2a98412c54b (patch) (side-by-side diff) | |
tree | 04dea39ccf2725f4992d5b8bdbf12807e9a67ae2 /libopie2/opiepim/backend/ocontactaccessbackend.cpp | |
parent | 07a4cf7e277aee7097c4da286a2559b717054362 (diff) | |
download | opie-37f290f048eeade1036cd1dc2239d2a98412c54b.zip opie-37f290f048eeade1036cd1dc2239d2a98412c54b.tar.gz opie-37f290f048eeade1036cd1dc2239d2a98412c54b.tar.bz2 |
Added new generic sorted for the databook backends. Needed an sortedvector
to do this job, which is now added to private classes..
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend.cpp | 5 |
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,19 +1,20 @@ /* 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 @@ -224,33 +225,33 @@ bool OPimContactAccessBackend::hasQuerySettings (uint querySettings) const ){ 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; |