Diffstat (limited to 'core/pim/osearch/todosearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/todosearch.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp index 82fae8d..9a22ee1 100644 --- a/core/pim/osearch/todosearch.cpp +++ b/core/pim/osearch/todosearch.cpp @@ -21,43 +21,45 @@ TodoSearch::TodoSearch(QListView* parent, QString name) : SearchGroup(parent, name) { //_fileName = QDir::homeDirPath()+"/Applications/todolist/todolist.xml"; _todos = 0; } TodoSearch::~TodoSearch() { delete _todos; } void TodoSearch::expand() { SearchGroup::expand(); if (_search.isEmpty()) return; if (!_todos){ _todos = new OTodoAccess(); _todos->load(); } +#ifdef LIPBOPIE_SEARCH ORecordList<OTodo> results = _todos->matchRegexp(_search); for (uint i = 0; i < results.count(); i++) { new TodoItem( this, new OTodo( results[i] )); } -/* +#else ORecordList<OTodo> list = _todos->allRecords(); QArray<int> m_currentQuery( list.count() ); for( uint i=0; i<list.count(); i++ ){ // qDebug("todo: %s",list[i].summary().latin1() ); if ( list[i].match( _search ) ){ // qDebug("FOUND"); new TodoItem( this, new OTodo( list[i] ) ); } - }*/ + } +#endif } |