summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Side-by-side diff
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
@@ -705,25 +705,19 @@ void KOTodoView::updateView()
} else
incidence = 0;
}
if ( next )
todo = todoList.next();
}
-// qDebug("again .... ");
-// for(todo = todoList.first(); todo; todo = todoList.next()) {
-
-// qDebug("yytodo %s ", todo->summary().latin1());
-// }
- //qDebug("for ");
+
for(todo = todoList.first(); todo; todo = todoList.next()) {
if (!mTodoMap.contains(todo) && checkTodo( todo ) )
{
insertTodoItem(todo);
}
}
- //qDebug("for end ");
// Restore opened/closed state
mTodoListView->blockSignals( true );
if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() );
mTodoListView->blockSignals( false );
resetCurrentItem();
processSelectionChange();
@@ -909,13 +903,12 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
calPrinter->preview(CalPrinter::Todolist, fd, td);
#endif
}
void KOTodoView::editItem(QListViewItem *item )
{
- // qDebug("editItem(QListViewItem *item ) ");
emit editTodoSignal(((KOTodoViewItem *)item)->todo());
}
void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
{
emit showTodoSignal(((KOTodoViewItem *)item)->todo());
@@ -1093,13 +1086,13 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
if ( pendingSubtodo != 0 ) {
topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
}
pendingSubtodo = 0;
//int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() );
- qDebug("ROW %d ", row);
+ //qDebug("ROW %d ", row);
if (!item) {
newTodo();
return;
} else {
if ( row == 2 || row == 1 ) {
mActiveItem = (KOTodoViewItem *) item;
@@ -1167,31 +1160,13 @@ void KOTodoView::itemClicked(QListViewItem *item)
Todo* newSub = pendingSubtodo->todo();
pendingSubtodo = 0;
emit reparentTodoSignal( newParent,newSub );
return;
}
}
-#if 0
- // handled by the item itself
- bool completed = todoItem->todo()->isCompleted(); // Completed or not?
- qDebug("com %d ",completed );
- qDebug("itemclicked ");
- if (todoItem->isOn()) {
- qDebug("on ");
- if (!completed) {
- qDebug("set true ");
- todoItem->todo()->setCompleted(QDateTime::currentDateTime());
- }
- } else {
- qDebug("not on ");
- if (completed) {
- qDebug("set false ");
- todoItem->todo()->setCompleted(false);
- }
- }
-#endif
+
}
void KOTodoView::setDocumentId( const QString &id )
{
mDocPrefs->setDoc( id );