Diffstat (limited to 'core/pim/osearch/datebooksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/datebooksearch.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp index 85c55c2..e60a3b1 100644 --- a/core/pim/osearch/datebooksearch.cpp +++ b/core/pim/osearch/datebooksearch.cpp @@ -16,44 +16,48 @@ #include <opie/oevent.h> #include <opie/odatebookaccess.h> DatebookSearch::DatebookSearch(QListView* parent, QString name) : SearchGroup(parent, name) { _dates = 0; } DatebookSearch::~DatebookSearch() { delete _dates; } void DatebookSearch::expand() { SearchGroup::expand(); if (!_dates){ _dates = new ODateBookAccess(); _dates->load(); } - +#define LIPBOPIE_SEARCH +#ifdef LIPBOPIE_SEARCH + ORecordList<OEvent> results = _dates->matchRegexp(_search); + for (uint i = 0; i < results.count(); i++) { + new EventItem( this, new OEvent( results[i] )); + } +#else ORecordList<OEvent> list = _dates->allRecords(); QArray<int> m_currentQuery( list.count() ); for( uint i=0; i<list.count(); i++ ){ - + //qDebug("datebook: %s",list[i].description().latin1() ); if ( ( list[i].description().contains( _search ) ) || ( list[i].note().contains( _search ) ) || ( list[i].location().contains( _search ) ) -// ( _search.find( list[i].description(), 0 ) > 0 ) || -// ( _search.find( list[i].note(), 0 ) > 0 ) || -// ( _search.find( list[i].location(), 0 ) > 0 ) ){ + //qDebug("FOUND"); new EventItem( this, new OEvent( list[i] ) ); -// new OListViewItem( this, list[i].description() ); } } +#endif } |