author | tille <tille> | 2003-05-08 12:16:38 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-08 12:16:38 (UTC) |
commit | 763d7d7da84682fb87a631a997e93c08f5abde61 (patch) (unidiff) | |
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) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/todosearch.cpp | 14 |
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 | |||
@@ -35,18 +35,28 @@ TodoSearch::~TodoSearch() | |||
35 | void TodoSearch::expand() | 35 | void TodoSearch::expand() |
36 | { | 36 | { |
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(); |
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 | ||