author | tille <tille> | 2003-05-08 12:16:38 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-08 12:16:38 (UTC) |
commit | 763d7d7da84682fb87a631a997e93c08f5abde61 (patch) (side-by-side diff) | |
tree | 9cfeb731b793e3634fa751a6b6ffce63609f24a2 /core/pim/osearch/todosearch.cpp | |
parent | 9e08dd00a96ffb4141da9f4ce2df0b871b334691 (diff) | |
download | opie-763d7d7da84682fb87a631a997e93c08f5abde61.zip opie-763d7d7da84682fb87a631a997e93c08f5abde61.tar.gz opie-763d7d7da84682fb87a631a997e93c08f5abde61.tar.bz2 |
this needs the new libopie patch...
Diffstat (limited to 'core/pim/osearch/todosearch.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/todosearch.cpp | 12 |
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() void TodoSearch::expand() { SearchGroup::expand(); + if (_search.isEmpty()) return; + if (!_todos){ _todos = new OTodoAccess(); _todos->load(); } + + 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(); QArray<int> m_currentQuery( list.count() ); 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] ) ); } - } + }*/ } |