-rw-r--r-- | core/pim/osearch/contactitem.cpp | 4 | ||||
-rw-r--r-- | core/pim/osearch/datebooksearch.cpp | 17 | ||||
-rw-r--r-- | core/pim/osearch/searchgroup.h | 1 | ||||
-rw-r--r-- | core/pim/osearch/todoitem.cpp | 6 | ||||
-rw-r--r-- | core/pim/osearch/todosearch.cpp | 15 |
5 files changed, 5 insertions, 38 deletions
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp index 29d81be..788a415 100644 --- a/core/pim/osearch/contactitem.cpp +++ b/core/pim/osearch/contactitem.cpp | |||
@@ -37,15 +37,15 @@ QString ContactItem::toRichText() | |||
37 | 37 | ||
38 | void ContactItem::editItem() | 38 | void ContactItem::editItem() |
39 | { | 39 | { |
40 | QCopEnvelope e("QPE/Application/addressbook", "edit(int)"); | 40 | QCopEnvelope e("QPE/Application/addressbook", "edit(int)"); |
41 | //QCopEnvelope e("QPE/Addressbook", "editEvent(int)"); | 41 | //QCopEnvelope e("QPE/Addressbook", "edit(int)"); |
42 | e << _contact->uid(); | 42 | e << _contact->uid(); |
43 | } | 43 | } |
44 | 44 | ||
45 | void ContactItem::showItem() | 45 | void ContactItem::showItem() |
46 | { | 46 | { |
47 | QCopEnvelope e("QPE/Application/addressbook", "show(int)"); | 47 | QCopEnvelope e("QPE/Application/addressbook", "show(int)"); |
48 | //QCopEnvelope e("QPE/Addressbook", "viewDefault(QDate)"); | 48 | //QCopEnvelope e("QPE/Addressbook", "show(int)"); |
49 | e << _contact->uid(); | 49 | e << _contact->uid(); |
50 | } | 50 | } |
51 | 51 | ||
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp index 0590252..83b99f5 100644 --- a/core/pim/osearch/datebooksearch.cpp +++ b/core/pim/osearch/datebooksearch.cpp | |||
@@ -36,28 +36,11 @@ void DatebookSearch::expand() | |||
36 | if (!_dates){ | 36 | if (!_dates){ |
37 | _dates = new ODateBookAccess(); | 37 | _dates = new ODateBookAccess(); |
38 | _dates->load(); | 38 | _dates->load(); |
39 | } | 39 | } |
40 | #ifdef LIPBOPIE_SEARCH | ||
41 | ORecordList<OEvent> results = _dates->matchRegexp(_search); | 40 | ORecordList<OEvent> results = _dates->matchRegexp(_search); |
42 | setText(0, text(0) + " (" + QString::number( results.count() ) + ")" ); | 41 | setText(0, text(0) + " (" + QString::number( results.count() ) + ")" ); |
43 | for (uint i = 0; i < results.count(); i++) { | 42 | for (uint i = 0; i < results.count(); i++) { |
44 | new EventItem( this, new OEvent( results[i] )); | 43 | new EventItem( this, new OEvent( results[i] )); |
45 | } | 44 | } |
46 | #else | ||
47 | ORecordList<OEvent> list = _dates->allRecords(); | ||
48 | QArray<int> m_currentQuery( list.count() ); | ||
49 | for( uint i=0; i<list.count(); i++ ){ | ||
50 | //qDebug("datebook: %s",list[i].description().latin1() ); | ||
51 | if ( | ||
52 | ( list[i].description().contains( _search ) ) || | ||
53 | ( list[i].note().contains( _search ) ) || | ||
54 | ( list[i].location().contains( _search ) ) | ||
55 | ){ | ||
56 | //qDebug("FOUND"); | ||
57 | new EventItem( this, new OEvent( list[i] ) ); | ||
58 | } | ||
59 | |||
60 | } | ||
61 | #endif | ||
62 | } | 45 | } |
63 | 46 | ||
diff --git a/core/pim/osearch/searchgroup.h b/core/pim/osearch/searchgroup.h index 4195e6f..d26ff17 100644 --- a/core/pim/osearch/searchgroup.h +++ b/core/pim/osearch/searchgroup.h | |||
@@ -15,9 +15,8 @@ | |||
15 | 15 | ||
16 | #include "olistviewitem.h" | 16 | #include "olistviewitem.h" |
17 | 17 | ||
18 | #include <qregexp.h> | 18 | #include <qregexp.h> |
19 | #define LIPBOPIE_SEARCH | ||
20 | 19 | ||
21 | /** | 20 | /** |
22 | @author Patrick S. Vogt | 21 | @author Patrick S. Vogt |
23 | */ | 22 | */ |
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp index 4ea4586..145b423 100644 --- a/core/pim/osearch/todoitem.cpp +++ b/core/pim/osearch/todoitem.cpp | |||
@@ -41,14 +41,14 @@ QString TodoItem::toRichText() | |||
41 | 41 | ||
42 | void TodoItem::showItem() | 42 | void TodoItem::showItem() |
43 | { | 43 | { |
44 | //QCopEnvelope e("QPE/Todolist", "show(int)"); | 44 | //QCopEnvelope e("QPE/Todolist", "show(int)"); |
45 | qDebug("calling todolist for %i",_todo->uid()); | 45 | QCopEnvelope e("QPE/Application/todolist", "show(int)"); |
46 | QCopEnvelope e("QPE/Todolist", "show(int)"); | ||
47 | e << _todo->uid(); | 46 | e << _todo->uid(); |
48 | } | 47 | } |
49 | 48 | ||
50 | void TodoItem::editItem() | 49 | void TodoItem::editItem() |
51 | { | 50 | { |
52 | QCopEnvelope e("QPE/Todolist", "edit(int)"); | 51 | //QCopEnvelope e("QPE/Todolist", "edit(int)"); |
52 | QCopEnvelope e("QPE/Application/todolist", "edit(int)"); | ||
53 | e << _todo->uid(); | 53 | e << _todo->uid(); |
54 | } | 54 | } |
diff --git a/core/pim/osearch/todosearch.cpp b/core/pim/osearch/todosearch.cpp index fba8aa0..cbe356b 100644 --- a/core/pim/osearch/todosearch.cpp +++ b/core/pim/osearch/todosearch.cpp | |||
@@ -13,16 +13,14 @@ | |||
13 | #include "todosearch.h" | 13 | #include "todosearch.h" |
14 | 14 | ||
15 | #include <opie/otodoaccess.h> | 15 | #include <opie/otodoaccess.h> |
16 | #include <opie/otodo.h> | 16 | #include <opie/otodo.h> |
17 | #include <qdir.h> | ||
18 | 17 | ||
19 | #include "todoitem.h" | 18 | #include "todoitem.h" |
20 | 19 | ||
21 | TodoSearch::TodoSearch(QListView* parent, QString name) | 20 | TodoSearch::TodoSearch(QListView* parent, QString name) |
22 | : SearchGroup(parent, name) | 21 | : SearchGroup(parent, name) |
23 | { | 22 | { |
24 | //_fileName = QDir::homeDirPath()+"/Applications/todolist/todolist.xml"; | ||
25 | _todos = 0; | 23 | _todos = 0; |
26 | } | 24 | } |
27 | 25 | ||
28 | 26 | ||
@@ -41,26 +39,13 @@ void TodoSearch::expand() | |||
41 | _todos = new OTodoAccess(); | 39 | _todos = new OTodoAccess(); |
42 | _todos->load(); | 40 | _todos->load(); |
43 | } | 41 | } |
44 | 42 | ||
45 | #ifdef LIPBOPIE_SEARCH | ||
46 | ORecordList<OTodo> results = _todos->matchRegexp(_search); | 43 | ORecordList<OTodo> results = _todos->matchRegexp(_search); |
47 | setText(0, text(0) + " (" + QString::number( results.count() ) + ")"); | 44 | setText(0, text(0) + " (" + QString::number( results.count() ) + ")"); |
48 | for (uint i = 0; i < results.count(); i++) { | 45 | for (uint i = 0; i < results.count(); i++) { |
49 | new TodoItem( this, new OTodo( results[i] )); | 46 | new TodoItem( this, new OTodo( results[i] )); |
50 | } | 47 | } |
51 | #else | ||
52 | ORecordList<OTodo> list = _todos->allRecords(); | ||
53 | QArray<int> m_currentQuery( list.count() ); | ||
54 | for( uint i=0; i<list.count(); i++ ){ | ||
55 | // qDebug("todo: %s",list[i].summary().latin1() ); | ||
56 | if ( list[i].match( _search ) ){ | ||
57 | // qDebug("FOUND"); | ||
58 | new TodoItem( this, new OTodo( list[i] ) ); | ||
59 | } | ||
60 | |||
61 | } | ||
62 | #endif | ||
63 | 48 | ||
64 | } | 49 | } |
65 | 50 | ||
66 | 51 | ||