Diffstat (limited to 'core/pim/osearch/todosearch.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/todosearch.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp index cbe356b..6a73530 100644 --- a/core/pim/osearch/todosearch.cpp +++ b/core/pim/osearch/todosearch.cpp @@ -30,22 +30,21 @@ TodoSearch::~TodoSearch() } -void TodoSearch::expand() +void TodoSearch::load() { - SearchGroup::expand(); - if (_search.isEmpty()) return; - - if (!_todos){ _todos = new OTodoAccess(); _todos->load(); } +int TodoSearch::search() +{ ORecordList<OTodo> results = _todos->matchRegexp(_search); - setText(0, text(0) + " (" + QString::number( results.count() ) + ")"); - for (uint i = 0; i < results.count(); i++) { + for (uint i = 0; i < results.count(); i++) new TodoItem( this, new OTodo( results[i] )); + return results.count(); } -} - +void TodoSearch::insertItem( void* ) +{ +} |