summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp31
1 files changed, 3 insertions, 28 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index dd2c081..0a608dc 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -708,19 +708,13 @@ void KOTodoView::updateView()
708 if ( next ) 708 if ( next )
709 todo = todoList.next(); 709 todo = todoList.next();
710 } 710 }
711// qDebug("again .... "); 711
712// for(todo = todoList.first(); todo; todo = todoList.next()) {
713
714// qDebug("yytodo %s ", todo->summary().latin1());
715// }
716 //qDebug("for ");
717 for(todo = todoList.first(); todo; todo = todoList.next()) { 712 for(todo = todoList.first(); todo; todo = todoList.next()) {
718 if (!mTodoMap.contains(todo) && checkTodo( todo ) ) 713 if (!mTodoMap.contains(todo) && checkTodo( todo ) )
719 { 714 {
720 insertTodoItem(todo); 715 insertTodoItem(todo);
721 } 716 }
722 } 717 }
723 //qDebug("for end ");
724 // Restore opened/closed state 718 // Restore opened/closed state
725 mTodoListView->blockSignals( true ); 719 mTodoListView->blockSignals( true );
726 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); 720 if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() );
@@ -912,7 +906,6 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
912 906
913void KOTodoView::editItem(QListViewItem *item ) 907void KOTodoView::editItem(QListViewItem *item )
914{ 908{
915 // qDebug("editItem(QListViewItem *item ) ");
916 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 909 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
917} 910}
918 911
@@ -1096,7 +1089,7 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
1096 pendingSubtodo = 0; 1089 pendingSubtodo = 0;
1097 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); 1090 //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
1098 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); 1091 int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() );
1099 qDebug("ROW %d ", row); 1092 //qDebug("ROW %d ", row);
1100 if (!item) { 1093 if (!item) {
1101 newTodo(); 1094 newTodo();
1102 return; 1095 return;
@@ -1170,25 +1163,7 @@ void KOTodoView::itemClicked(QListViewItem *item)
1170 return; 1163 return;
1171 } 1164 }
1172 } 1165 }
1173#if 0 1166
1174 // handled by the item itself
1175 bool completed = todoItem->todo()->isCompleted(); // Completed or not?
1176 qDebug("com %d ",completed );
1177 qDebug("itemclicked ");
1178 if (todoItem->isOn()) {
1179 qDebug("on ");
1180 if (!completed) {
1181 qDebug("set true ");
1182 todoItem->todo()->setCompleted(QDateTime::currentDateTime());
1183 }
1184 } else {
1185 qDebug("not on ");
1186 if (completed) {
1187 qDebug("set false ");
1188 todoItem->todo()->setCompleted(false);
1189 }
1190 }
1191#endif
1192} 1167}
1193 1168
1194void KOTodoView::setDocumentId( const QString &id ) 1169void KOTodoView::setDocumentId( const QString &id )