summaryrefslogtreecommitdiff
path: root/core/pim/osearch/todosearch.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/todosearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/todosearch.cpp19
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
@@ -27,25 +27,24 @@ TodoSearch::TodoSearch(QListView* parent, QString name)
27TodoSearch::~TodoSearch() 27TodoSearch::~TodoSearch()
28{ 28{
29 delete _todos; 29 delete _todos;
30} 30}
31 31
32 32
33void TodoSearch::expand() 33void 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
39int 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
47void TodoSearch::insertItem( void* )
48{
51 49
50}