summaryrefslogtreecommitdiff
path: root/core/pim/osearch/applnksearch.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/applnksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/applnksearch.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/core/pim/osearch/applnksearch.cpp b/core/pim/osearch/applnksearch.cpp
index 7872ae3..d5b2930 100644
--- a/core/pim/osearch/applnksearch.cpp
+++ b/core/pim/osearch/applnksearch.cpp
@@ -2,7 +2,7 @@
2// 2//
3// C++ Implementation: $MODULE$ 3// C++ Implementation: $MODULE$
4// 4//
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
@@ -29,18 +29,27 @@ AppLnkSearch::~AppLnkSearch()
29} 29}
30 30
31 31
32void AppLnkSearch::expand() 32void AppLnkSearch::load()
33{ 33{
34 SearchGroup::expand(); 34 _apps = new AppLnkSet(QPEApplication::qpeDir());
35 if (_search.isEmpty()) return; 35}
36 if (!_apps) _apps = new AppLnkSet(QPEApplication::qpeDir()); 36
37int AppLnkSearch::search()
38{
39 int count = 0;
37 QList<AppLnk> appList = _apps->children(); 40 QList<AppLnk> appList = _apps->children();
38 for ( AppLnk *app = appList.first(); app != 0; app = appList.next() ){ 41 for ( AppLnk *app = appList.first(); app != 0; app = appList.next() ){
39 // if (app->name().contains(_search) || app->comment().contains(_search))
40 if ( (_search.match( app->name() ) != -1) 42 if ( (_search.match( app->name() ) != -1)
41 || (_search.match(app->comment()) != -1) 43 || (_search.match(app->comment()) != -1)
42 || (_search.match(app->exec()) != -1) ) 44 || (_search.match(app->exec()) != -1) ) {
43 new AppLnkItem( this, app ); 45 count++;
46 insertItem( app );
47 }
44 } 48 }
49 return count;
45} 50}
46 51
52void AppLnkSearch::insertItem( void *rec )
53{
54 new AppLnkItem( this, (AppLnk*)rec );
55}