summaryrefslogtreecommitdiff
path: root/core/pim/osearch/todosearch.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/todosearch.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/osearch/todosearch.cpp12
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
@@ -35,18 +35,28 @@ TodoSearch::~TodoSearch()
35void TodoSearch::expand() 35void TodoSearch::expand()
36{ 36{
37 SearchGroup::expand(); 37 SearchGroup::expand();
38 if (_search.isEmpty()) return;
39
38 if (!_todos){ 40 if (!_todos){
39 _todos = new OTodoAccess(); 41 _todos = new OTodoAccess();
40 _todos->load(); 42 _todos->load();
41 } 43 }
44
45 ORecordList<OTodo> results = _todos->matchRegexp(_search);
46 for (uint i = 0; i < results.count(); i++) {
47 new TodoItem( this, new OTodo( results[i] ));
48 }
49/*
42 ORecordList<OTodo> list = _todos->allRecords(); 50 ORecordList<OTodo> list = _todos->allRecords();
43 QArray<int> m_currentQuery( list.count() ); 51 QArray<int> m_currentQuery( list.count() );
44 for( uint i=0; i<list.count(); i++ ){ 52 for( uint i=0; i<list.count(); i++ ){
53 // qDebug("todo: %s",list[i].summary().latin1() );
45 if ( list[i].match( _search ) ){ 54 if ( list[i].match( _search ) ){
55 // qDebug("FOUND");
46 new TodoItem( this, new OTodo( list[i] ) ); 56 new TodoItem( this, new OTodo( list[i] ) );
47 } 57 }
48 58
49 } 59 }*/
50 60
51} 61}
52 62