Diffstat (limited to 'core/pim/osearch/doclnksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/doclnksearch.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/core/pim/osearch/doclnksearch.cpp b/core/pim/osearch/doclnksearch.cpp index e99a385..f2a60e9 100644 --- a/core/pim/osearch/doclnksearch.cpp +++ b/core/pim/osearch/doclnksearch.cpp | |||
@@ -17,30 +17,22 @@ | |||
17 | 17 | ||
18 | #include "doclnkitem.h" | 18 | #include "doclnkitem.h" |
19 | 19 | ||
20 | DocLnkSearch::DocLnkSearch(QListView* parent, QString name): SearchGroup(parent, name) | 20 | DocLnkSearch::DocLnkSearch(QListView* parent, QString name) |
21 | : AppLnkSearch(parent, name) | ||
21 | { | 22 | { |
22 | _docs = 0; | ||
23 | } | 23 | } |
24 | 24 | ||
25 | 25 | ||
26 | DocLnkSearch::~DocLnkSearch() | 26 | DocLnkSearch::~DocLnkSearch() |
27 | { | 27 | { |
28 | delete _docs; | ||
29 | } | 28 | } |
30 | 29 | ||
31 | 30 | void DocLnkSearch::load() | |
32 | void DocLnkSearch::expand() | ||
33 | { | 31 | { |
34 | SearchGroup::expand(); | 32 | _apps = new DocLnkSet(QPEApplication::documentDir()); |
35 | if (_search.isEmpty()) return; | ||
36 | if (!_docs) _docs = new DocLnkSet(QPEApplication::documentDir()); | ||
37 | QList<DocLnk> appList = _docs->children(); | ||
38 | for ( DocLnk *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) | ||
41 | || (_search.match(app->comment()) != -1) | ||
42 | || (_search.match(app->exec()) != -1) ) | ||
43 | new DocLnkItem( this, app ); | ||
44 | } | ||
45 | } | 33 | } |
46 | 34 | ||
35 | void DocLnkSearch::insertItem( void *rec ) | ||
36 | { | ||
37 | new DocLnkItem( this, (DocLnk*)rec ); | ||
38 | } | ||