From d371c94c81f9f0e961aa7e47a27c323215709e8a Mon Sep 17 00:00:00 2001 From: tille Date: Fri, 09 May 2003 12:01:20 +0000 Subject: counting results now --- (limited to 'core') diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp index c5b1ae7..0ee8eba 100644 --- a/core/pim/osearch/adresssearch.cpp +++ b/core/pim/osearch/adresssearch.cpp @@ -13,6 +13,7 @@ #include "adresssearch.h" #include +#include #include "contactitem.h" //#include @@ -36,6 +37,7 @@ void AdressSearch::expand() if (_search.isEmpty()) return; if (!_contacts) _contacts = new OContactAccess("osearch"); ORecordList results = _contacts->matchRegexp(_search); + setText(0, text(0) + " (" + QString::number( results.count() ) + ")" ); for (uint i = 0; i < results.count(); i++) { new ContactItem( this, new OContact( results[i] )); } diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp index 8f9d472..0590252 100644 --- a/core/pim/osearch/datebooksearch.cpp +++ b/core/pim/osearch/datebooksearch.cpp @@ -39,6 +39,7 @@ void DatebookSearch::expand() } #ifdef LIPBOPIE_SEARCH ORecordList results = _dates->matchRegexp(_search); + setText(0, text(0) + " (" + QString::number( results.count() ) + ")" ); for (uint i = 0; i < results.count(); i++) { new EventItem( this, new OEvent( results[i] )); } diff --git a/core/pim/osearch/searchgroup.h b/core/pim/osearch/searchgroup.h index 6b6bbf5..4195e6f 100644 --- a/core/pim/osearch/searchgroup.h +++ b/core/pim/osearch/searchgroup.h @@ -16,8 +16,7 @@ #include "olistviewitem.h" #include - -//#define LIPBOPIE_SEARCH +#define LIPBOPIE_SEARCH /** @author Patrick S. Vogt diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp index 9a22ee1..fba8aa0 100644 --- a/core/pim/osearch/todosearch.cpp +++ b/core/pim/osearch/todosearch.cpp @@ -44,6 +44,7 @@ void TodoSearch::expand() #ifdef LIPBOPIE_SEARCH ORecordList results = _todos->matchRegexp(_search); + setText(0, text(0) + " (" + QString::number( results.count() ) + ")"); for (uint i = 0; i < results.count(); i++) { new TodoItem( this, new OTodo( results[i] )); } -- cgit v0.9.0.2