Diffstat (limited to 'core/pim/osearch/searchgroup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/searchgroup.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/core/pim/osearch/searchgroup.cpp b/core/pim/osearch/searchgroup.cpp index e307696..0b58176 100644 --- a/core/pim/osearch/searchgroup.cpp +++ b/core/pim/osearch/searchgroup.cpp @@ -11,6 +11,6 @@ // // -#include "searchgroup.h" +#include <qobject.h> #include <qregexp.h> #include <qapplication.h> @@ -18,6 +18,6 @@ #include "olistviewitem.h" +#include "searchgroup.h" -//#define NEW_OWAIT #ifndef NEW_OWAIT static OWait *wait = 0; @@ -40,5 +40,5 @@ void SearchGroup::expand() { //expanded = true; - clearList(); + if (_lastSearch != _search) clearList(); if (_search.isEmpty()) return; OListViewItem *dummy = new OListViewItem( this, "searching..."); @@ -70,22 +70,21 @@ void SearchGroup::setSearch(QRegExp re) int SearchGroup::realSearch() { + if (_lastSearch == _search) return _resultCount; #ifndef NEW_OWAIT - qDebug("NOT using NEW_OWAIT"); if (!wait) wait = new OWait( qApp->mainWidget(), "osearch" ); wait->show(); qApp->processEvents(); #else - qDebug("using NEW_OWAIT"); - OWait::start( "osearch" ); + qDebug("********** NEW_OWAIT *************"); + OWait( "searching" ); #endif if (!loaded) load(); _resultCount = 0; _resultCount = search(); + _lastSearch = _search; setText(0, _name + " - " + _search.pattern() + " (" + QString::number( _resultCount ) + ")"); #ifndef NEW_OWAIT wait->hide(); -#else - OWait::stop(); #endif return _resultCount; |