Diffstat (limited to 'core/pim/osearch/todosearch.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/todosearch.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp index e34c384..82fae8d 100644 --- a/core/pim/osearch/todosearch.cpp +++ b/core/pim/osearch/todosearch.cpp @@ -36,16 +36,26 @@ void TodoSearch::expand() { SearchGroup::expand(); + if (_search.isEmpty()) return; + if (!_todos){ _todos = new OTodoAccess(); _todos->load(); } + + ORecordList<OTodo> results = _todos->matchRegexp(_search); + for (uint i = 0; i < results.count(); i++) { + new TodoItem( this, new OTodo( results[i] )); + } +/* 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] ) ); } - } + }*/ } |