summaryrefslogtreecommitdiff
path: root/core/pim
Side-by-side diff
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/adresssearch.cpp2
-rw-r--r--core/pim/osearch/datebooksearch.cpp1
-rw-r--r--core/pim/osearch/searchgroup.h3
-rw-r--r--core/pim/osearch/todosearch.cpp1
4 files changed, 5 insertions, 2 deletions
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
@@ -10,12 +10,13 @@
// Copyright: See COPYING file that comes with this distribution
//
//
#include "adresssearch.h"
#include <opie/ocontactaccess.h>
+#include <qstring.h>
#include "contactitem.h"
//#include <qdir.h>
AdressSearch::AdressSearch(QListView* parent, QString name):
SearchGroup(parent, name)
@@ -33,11 +34,12 @@ AdressSearch::~AdressSearch()
void AdressSearch::expand()
{
SearchGroup::expand();
if (_search.isEmpty()) return;
if (!_contacts) _contacts = new OContactAccess("osearch");
ORecordList<OContact> 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
@@ -36,12 +36,13 @@ void DatebookSearch::expand()
if (!_dates){
_dates = new ODateBookAccess();
_dates->load();
}
#ifdef LIPBOPIE_SEARCH
ORecordList<OEvent> 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] ));
}
#else
ORecordList<OEvent> list = _dates->allRecords();
QArray<int> m_currentQuery( list.count() );
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
@@ -13,14 +13,13 @@
#ifndef SEARCHGROUP_H
#define SEARCHGROUP_H
#include "olistviewitem.h"
#include <qregexp.h>
-
-//#define LIPBOPIE_SEARCH
+#define LIPBOPIE_SEARCH
/**
@author Patrick S. Vogt
*/
class SearchGroup : public OListViewItem
{
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
@@ -41,12 +41,13 @@ void TodoSearch::expand()
_todos = new OTodoAccess();
_todos->load();
}
#ifdef LIPBOPIE_SEARCH
ORecordList<OTodo> 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] ));
}
#else
ORecordList<OTodo> list = _todos->allRecords();
QArray<int> m_currentQuery( list.count() );