summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
authorzautrix <zautrix>2005-06-13 13:57:22 (UTC)
committer zautrix <zautrix>2005-06-13 13:57:22 (UTC)
commit56de219c5ce910a470a01a0e5003d1a113837ef4 (patch) (side-by-side diff)
tree3393cb306cec8dcdc05d6ed0fae3ae7d374f2794 /korganizer/kotodoview.cpp
parent4f3ff02932b39bf16b9692c3cb69c101a28b4616 (diff)
downloadkdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.zip
kdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.tar.gz
kdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.tar.bz2
fixxx
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp52
1 files changed, 27 insertions, 25 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 2602487..35c2a9f 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -701,10 +701,10 @@ void KOTodoView::updateView()
bool next = true;
// qDebug("todo %s ", todo->summary().latin1());
Incidence *incidence = todo->relatedTo();
- while ( incidence ) {
+ while ( incidence ) {
if ( incidence->typeID() == todoID ) {
//qDebug("related %s ",incidence->summary().latin1() );
- if ( !(todoList.contains ( ((Todo* )incidence ) ) )) {
+ if ( !(todoList.contains ( ((Todo* )incidence ) ) ) && incidence->calEnabled() ) {
//qDebug("related not found ");
todoList.remove( );
todo = todoList.current();
@@ -836,34 +836,36 @@ void KOTodoView::restoreItemState( QListViewItem *item )
QMap<Todo *,KOTodoViewItem *>::ConstIterator
- KOTodoView::insertTodoItem(Todo *todo)
+KOTodoView::insertTodoItem(Todo *todo)
{
-// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
- // TODO: Check, if dynmaic cast is necessary
+ // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
+ // TODO: Check, if dynmaic cast is necessary
pendingSubtodo = 0;
- Incidence *incidence = todo->relatedTo();
- if (incidence && incidence->typeID() == todoID ) {
- Todo *relatedTodo = static_cast<Todo *>(incidence);
-
-// kdDebug() << " has Related" << endl;
- QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
- itemIterator = mTodoMap.find(relatedTodo);
- if (itemIterator == mTodoMap.end()) {
-// kdDebug() << " related not yet in list" << endl;
- itemIterator = insertTodoItem (relatedTodo);
+ Incidence *incidence = todo->relatedTo();
+ while ( incidence && !incidence->calEnabled() )
+ incidence = incidence->relatedTo();
+ if (incidence && incidence->typeID() == todoID ) {
+ Todo *relatedTodo = static_cast<Todo *>(incidence);
+
+ // kdDebug() << " has Related" << endl;
+ QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
+ itemIterator = mTodoMap.find(relatedTodo);
+ if (itemIterator == mTodoMap.end()) {
+ // kdDebug() << " related not yet in list" << endl;
+ itemIterator = insertTodoItem (relatedTodo);
+ }
+ // isn't this pretty stupid? We give one Todo to the KOTodoViewItem
+ // and one into the map. Sure finding is more easy but why? -zecke
+ KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
+ return mTodoMap.insert(todo,todoItem);
+ } else {
+ // kdDebug() << " no Related" << endl;
+ // see above -zecke
+ KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
+ return mTodoMap.insert(todo,todoItem);
}
- // isn't this pretty stupid? We give one Todo to the KOTodoViewItem
- // and one into the map. Sure finding is more easy but why? -zecke
- KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
- return mTodoMap.insert(todo,todoItem);
- } else {
-// kdDebug() << " no Related" << endl;
- // see above -zecke
- KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
- return mTodoMap.insert(todo,todoItem);
- }
}