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.cpp14
1 files changed, 12 insertions, 2 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
@@ -37,3 +37,5 @@ void TodoSearch::expand()
37 SearchGroup::expand(); 37 SearchGroup::expand();
38 if (!_todos){ 38 if (_search.isEmpty()) return;
39
40 if (!_todos){
39 _todos = new OTodoAccess(); 41 _todos = new OTodoAccess();
@@ -41,2 +43,8 @@ void TodoSearch::expand()
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();
@@ -44,3 +52,5 @@ void TodoSearch::expand()
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] ) );
@@ -48,3 +58,3 @@ void TodoSearch::expand()
48 58
49 } 59 }*/
50 60