Diffstat (limited to 'core/pim/osearch/adresssearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/adresssearch.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp index 0ee8eba..69ad9ef 100644 --- a/core/pim/osearch/adresssearch.cpp +++ b/core/pim/osearch/adresssearch.cpp | |||
@@ -30,16 +30,21 @@ AdressSearch::~AdressSearch() | |||
30 | delete _contacts; | 30 | delete _contacts; |
31 | } | 31 | } |
32 | 32 | ||
33 | void AdressSearch::load() | ||
34 | { | ||
35 | _contacts = new OContactAccess("osearch"); | ||
36 | } | ||
33 | 37 | ||
34 | void AdressSearch::expand() | 38 | int AdressSearch::search() |
35 | { | 39 | { |
36 | SearchGroup::expand(); | ||
37 | if (_search.isEmpty()) return; | ||
38 | if (!_contacts) _contacts = new OContactAccess("osearch"); | ||
39 | ORecordList<OContact> results = _contacts->matchRegexp(_search); | 40 | ORecordList<OContact> results = _contacts->matchRegexp(_search); |
40 | setText(0, text(0) + " (" + QString::number( results.count() ) + ")" ); | ||
41 | for (uint i = 0; i < results.count(); i++) { | 41 | for (uint i = 0; i < results.count(); i++) { |
42 | new ContactItem( this, new OContact( results[i] )); | 42 | new ContactItem( this, new OContact( results[i] )); |
43 | } | 43 | } |
44 | return results.count(); | ||
44 | } | 45 | } |
45 | 46 | ||
47 | void AdressSearch::insertItem( void* ) | ||
48 | { | ||
49 | |||
50 | } | ||