Diffstat (limited to 'core/pim/osearch/searchgroup.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/searchgroup.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/pim/osearch/searchgroup.cpp b/core/pim/osearch/searchgroup.cpp index d062207..3159984 100644 --- a/core/pim/osearch/searchgroup.cpp +++ b/core/pim/osearch/searchgroup.cpp @@ -33,41 +33,42 @@ SearchGroup::~SearchGroup() void SearchGroup::expand() { clearList(); if (_search.isEmpty()) return; OListViewItem *dummy = new OListViewItem( this, "searching..."); setOpen( expanded ); if (!loaded) load(); int res_count = search(); setText(0, _name + " - " + _search.pattern() + " (" + QString::number( res_count ) + ")"); delete dummy; } +void SearchGroup::doSearch() +{ + clearList(); + if (_search.isEmpty()) return; + if (!loaded) load(); + int res_count = search(); + setText(0, _name + " - " + _search.pattern() + " (" + QString::number( res_count ) + ")"); +} void SearchGroup::clearList() { QListViewItem *item = firstChild(); QListViewItem *toDel; while ( item != 0 ) { toDel = item; item = item->nextSibling(); delete toDel; } expanded = true; } -void SearchGroup::setSearch(QString s) -{ - setSearch( QRegExp( s ) ); - _search.setCaseSensitive(false); -} - - void SearchGroup::setSearch(QRegExp re) { setText(0, _name+" - "+re.pattern() ); _search = re; if (expanded) expand(); else new OListViewItem( this, "searching..."); } |