Diffstat (limited to 'core/pim/osearch/adresssearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/adresssearch.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp index 2cd545f..f117fe6 100644 --- a/core/pim/osearch/adresssearch.cpp +++ b/core/pim/osearch/adresssearch.cpp | |||
@@ -5,55 +5,56 @@ | |||
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
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 <qstring.h> | 15 | #include <qstring.h> |
16 | #include <qiconset.h> | 16 | #include <qiconset.h> |
17 | #include <qwhatsthis.h> | 17 | //#include <qwhatsthis.h> |
18 | #include <qpe/resource.h> | 18 | #include <qpe/resource.h> |
19 | #include <opie/ocontactaccess.h> | 19 | #include <opie/ocontactaccess.h> |
20 | 20 | ||
21 | #include "contactitem.h" | 21 | #include "contactitem.h" |
22 | 22 | ||
23 | AdressSearch::AdressSearch(QListView* parent, QString name): | 23 | AdressSearch::AdressSearch(QListView* parent, QString name): |
24 | SearchGroup(parent, name) | 24 | SearchGroup(parent, name) |
25 | { | 25 | { |
26 | _contacts = 0; | 26 | _contacts = 0; |
27 | QIconSet is = Resource::loadIconSet( "addressbook/AddressBook" ); | 27 | QIconSet is = Resource::loadIconSet( "addressbook/AddressBook" ); |
28 | setPixmap( 0, is.pixmap( QIconSet::Small, true ) ); | 28 | setPixmap( 0, is.pixmap( QIconSet::Small, true ) ); |
29 | //QWhatsThis::add( this, QObject::tr("Search the addressbook") ); | ||
29 | /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" ); | 30 | /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" ); |
30 | QImage img = pix.convertToImage(); | 31 | QImage img = pix.convertToImage(); |
31 | img.smoothScale( 14, 14 ); | 32 | img.smoothScale( 14, 14 ); |
32 | pix.convertFromImage( img ); | 33 | pix.convertFromImage( img ); |
33 | setPixmap( 0, pix );*/ | 34 | setPixmap( 0, pix );*/ |
34 | } | 35 | } |
35 | 36 | ||
36 | 37 | ||
37 | AdressSearch::~AdressSearch() | 38 | AdressSearch::~AdressSearch() |
38 | { | 39 | { |
39 | delete _contacts; | 40 | delete _contacts; |
40 | } | 41 | } |
41 | 42 | ||
42 | void AdressSearch::load() | 43 | void AdressSearch::load() |
43 | { | 44 | { |
44 | _contacts = new OContactAccess("osearch"); | 45 | _contacts = new OContactAccess("osearch"); |
45 | } | 46 | } |
46 | 47 | ||
47 | int AdressSearch::search() | 48 | int AdressSearch::search() |
48 | { | 49 | { |
49 | ORecordList<OContact> results = _contacts->matchRegexp(_search); | 50 | ORecordList<OContact> results = _contacts->matchRegexp(_search); |
50 | for (uint i = 0; i < results.count(); i++) { | 51 | for (uint i = 0; i < results.count(); i++) { |
51 | new ContactItem( this, new OContact( results[i] )); | 52 | (void)new ContactItem( this, new OContact( results[i] )); |
52 | } | 53 | } |
53 | return results.count(); | 54 | return results.count(); |
54 | } | 55 | } |
55 | 56 | ||
56 | void AdressSearch::insertItem( void* ) | 57 | void AdressSearch::insertItem( void* ) |
57 | { | 58 | { |
58 | 59 | ||
59 | } | 60 | } |