Diffstat (limited to 'core/pim/osearch/applnksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/applnksearch.cpp | 25 |
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 | |||
@@ -4,3 +4,3 @@ | |||
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
@@ -31,16 +31,25 @@ AppLnkSearch::~AppLnkSearch() | |||
31 | 31 | ||
32 | void AppLnkSearch::expand() | 32 | void 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 | |
37 | int 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 | ||
52 | void AppLnkSearch::insertItem( void *rec ) | ||
53 | { | ||
54 | new AppLnkItem( this, (AppLnk*)rec ); | ||
55 | } | ||