summaryrefslogtreecommitdiff
path: root/core/pim/osearch/doclnksearch.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/doclnksearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/doclnksearch.cpp24
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
@@ -19,5 +19,5 @@
19 19
20DocLnkSearch::DocLnkSearch(QListView* parent, QString name): SearchGroup(parent, name) 20DocLnkSearch::DocLnkSearch(QListView* parent, QString name)
21: AppLnkSearch(parent, name)
21{ 22{
22 _docs = 0;
23} 23}
@@ -27,20 +27,12 @@ DocLnkSearch::~DocLnkSearch()
27{ 27{
28 delete _docs;
29} 28}
30 29
31 30void DocLnkSearch::load()
32void 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
35void DocLnkSearch::insertItem( void *rec )
36{
37 new DocLnkItem( this, (DocLnk*)rec );
38}