summaryrefslogtreecommitdiff
path: root/core/pim/osearch/adresssearch.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/adresssearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/adresssearch.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp
index c5b1ae7..0ee8eba 100644
--- a/core/pim/osearch/adresssearch.cpp
+++ b/core/pim/osearch/adresssearch.cpp
@@ -8,16 +8,17 @@
8// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 8// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
9// 9//
10// Copyright: See COPYING file that comes with this distribution 10// Copyright: See COPYING file that comes with this distribution
11// 11//
12// 12//
13#include "adresssearch.h" 13#include "adresssearch.h"
14 14
15#include <opie/ocontactaccess.h> 15#include <opie/ocontactaccess.h>
16#include <qstring.h>
16 17
17#include "contactitem.h" 18#include "contactitem.h"
18//#include <qdir.h> 19//#include <qdir.h>
19 20
20AdressSearch::AdressSearch(QListView* parent, QString name): 21AdressSearch::AdressSearch(QListView* parent, QString name):
21 SearchGroup(parent, name) 22 SearchGroup(parent, name)
22{ 23{
23 _contacts = 0; 24 _contacts = 0;
@@ -31,13 +32,14 @@ AdressSearch::~AdressSearch()
31 32
32 33
33void AdressSearch::expand() 34void AdressSearch::expand()
34{ 35{
35 SearchGroup::expand(); 36 SearchGroup::expand();
36 if (_search.isEmpty()) return; 37 if (_search.isEmpty()) return;
37 if (!_contacts) _contacts = new OContactAccess("osearch"); 38 if (!_contacts) _contacts = new OContactAccess("osearch");
38 ORecordList<OContact> results = _contacts->matchRegexp(_search); 39 ORecordList<OContact> results = _contacts->matchRegexp(_search);
40 setText(0, text(0) + " (" + QString::number( results.count() ) + ")" );
39 for (uint i = 0; i < results.count(); i++) { 41 for (uint i = 0; i < results.count(); i++) {
40 new ContactItem( this, new OContact( results[i] )); 42 new ContactItem( this, new OContact( results[i] ));
41 } 43 }
42} 44}
43 45