Diffstat (limited to 'core/pim/osearch/datebooksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/datebooksearch.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp index 83b99f5..68699fa 100644 --- a/core/pim/osearch/datebooksearch.cpp +++ b/core/pim/osearch/datebooksearch.cpp | |||
@@ -21,26 +21,30 @@ DatebookSearch::DatebookSearch(QListView* parent, QString name) | |||
21 | : SearchGroup(parent, name) | 21 | : SearchGroup(parent, name) |
22 | { | 22 | { |
23 | _dates = 0; | 23 | _dates = 0; |
24 | } | 24 | } |
25 | 25 | ||
26 | 26 | ||
27 | DatebookSearch::~DatebookSearch() | 27 | DatebookSearch::~DatebookSearch() |
28 | { | 28 | { |
29 | delete _dates; | 29 | delete _dates; |
30 | } | 30 | } |
31 | 31 | ||
32 | 32 | ||
33 | void DatebookSearch::expand() | 33 | void DatebookSearch::load() |
34 | { | 34 | { |
35 | SearchGroup::expand(); | ||
36 | if (!_dates){ | ||
37 | _dates = new ODateBookAccess(); | 35 | _dates = new ODateBookAccess(); |
38 | _dates->load(); | 36 | _dates->load(); |
39 | } | 37 | } |
38 | |||
39 | int DatebookSearch::search() | ||
40 | { | ||
40 | ORecordList<OEvent> results = _dates->matchRegexp(_search); | 41 | ORecordList<OEvent> results = _dates->matchRegexp(_search); |
41 | setText(0, text(0) + " (" + QString::number( results.count() ) + ")" ); | 42 | for (uint i = 0; i < results.count(); i++) |
42 | for (uint i = 0; i < results.count(); i++) { | ||
43 | new EventItem( this, new OEvent( results[i] )); | 43 | new EventItem( this, new OEvent( results[i] )); |
44 | } | 44 | return results.count(); |
45 | } | 45 | } |
46 | 46 | ||
47 | void DatebookSearch::insertItem( void* ) | ||
48 | { | ||
49 | |||
50 | } | ||