summaryrefslogtreecommitdiff
path: root/core/pim/osearch/todosearch.cpp
Side-by-side diff
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
@@ -37,2 +37,4 @@ void TodoSearch::expand()
SearchGroup::expand();
+ if (_search.isEmpty()) return;
+
if (!_todos){
@@ -41,2 +43,8 @@ void TodoSearch::expand()
}
+
+ ORecordList<OTodo> results = _todos->matchRegexp(_search);
+ for (uint i = 0; i < results.count(); i++) {
+ new TodoItem( this, new OTodo( results[i] ));
+ }
+/*
ORecordList<OTodo> list = _todos->allRecords();
@@ -44,3 +52,5 @@ void TodoSearch::expand()
for( uint i=0; i<list.count(); i++ ){
+ // qDebug("todo: %s",list[i].summary().latin1() );
if ( list[i].match( _search ) ){
+ // qDebug("FOUND");
new TodoItem( this, new OTodo( list[i] ) );
@@ -48,3 +58,3 @@ void TodoSearch::expand()
- }
+ }*/