Diffstat (limited to 'core/pim/osearch/todosearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/todosearch.cpp | 19 |
1 files changed, 9 insertions, 10 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 | |||
@@ -32,20 +32,19 @@ TodoSearch::~TodoSearch() | |||
32 | 32 | ||
33 | void TodoSearch::expand() | 33 | void TodoSearch::load() |
34 | { | 34 | { |
35 | SearchGroup::expand(); | ||
36 | if (_search.isEmpty()) return; | ||
37 | |||
38 | if (!_todos){ | ||
39 | _todos = new OTodoAccess(); | 35 | _todos = new OTodoAccess(); |
40 | _todos->load(); | 36 | _todos->load(); |
41 | } | 37 | } |
42 | 38 | ||
39 | int TodoSearch::search() | ||
40 | { | ||
43 | ORecordList<OTodo> results = _todos->matchRegexp(_search); | 41 | ORecordList<OTodo> results = _todos->matchRegexp(_search); |
44 | setText(0, text(0) + " (" + QString::number( results.count() ) + ")"); | 42 | for (uint i = 0; i < results.count(); i++) |
45 | for (uint i = 0; i < results.count(); i++) { | ||
46 | new TodoItem( this, new OTodo( results[i] )); | 43 | new TodoItem( this, new OTodo( results[i] )); |
47 | } | 44 | return results.count(); |
48 | |||
49 | } | 45 | } |
50 | 46 | ||
47 | void TodoSearch::insertItem( void* ) | ||
48 | { | ||
51 | 49 | ||
50 | } | ||