summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-30 12:08:19 (UTC)
committer zautrix <zautrix>2005-01-30 12:08:19 (UTC)
commit1bcef8b3f53419e7155e0862ad61e3e419763d70 (patch) (unidiff)
tree166b82db7bc30b7d55b042bd37bb92facea6cdf2
parent446ea98a9f6550c4a3e64bcfc6aab8e8b58776e8 (diff)
downloadkdepimpi-1bcef8b3f53419e7155e0862ad61e3e419763d70.zip
kdepimpi-1bcef8b3f53419e7155e0862ad61e3e419763d70.tar.gz
kdepimpi-1bcef8b3f53419e7155e0862ad61e3e419763d70.tar.bz2
fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp1
-rw-r--r--korganizer/kotodoview.cpp9
-rw-r--r--korganizer/kotodoviewitem.cpp18
-rw-r--r--libkcal/todo.cpp6
4 files changed, 27 insertions, 7 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index bbc43e4..42a6f7c 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1163,3 +1163,2 @@ void KOAgendaView::fillAgenda()
1163 fillIn = ((todo->dtDue().date() == currentDate) && !overdue) || ((currentDate == today) && overdue); 1163 fillIn = ((todo->dtDue().date() == currentDate) && !overdue) || ((currentDate == today) && overdue);
1164 qDebug("refill todo ");
1165 if ( fillIn ) { 1164 if ( fillIn ) {
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 14e8b5c..902f3f4 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -860,2 +860,11 @@ void KOTodoView::setNewPercentage(int index)
860 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 860 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
861
862 if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
863 mActiveItem->setOn( true );
864 return;
865 } else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
866 KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
867 if ( par && par->isOn() )
868 par->setOn( false );
869 }
861 if (mPercentage[index] == 100) { 870 if (mPercentage[index] == 100) {
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 2822237..1edddac 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -205,11 +205,12 @@ void KOTodoViewItem::stateChange(bool state)
205 if ( m_init ) return; 205 if ( m_init ) return;
206 qDebug("KOTodoViewItem::stateChange "); 206 if (isOn()!=state) {
207 setOn(state);
208 //qDebug("SETON ");
209 return;
210 }
207 QString keyd = "=="; 211 QString keyd = "==";
208 QString keyt = "=="; 212 QString keyt = "==";
209 213 //qDebug("KOTodoViewItem::stateChange %s ", text(0).latin1());
210 mTodo->setCompleted(state); 214 mTodo->setCompleted(state);
211 if (state) mTodo->setCompleted(QDateTime::currentDateTime()); 215 if (state) mTodo->setCompleted(QDateTime::currentDateTime());
212 if (isOn()!=state) {
213 setOn(state);
214 }
215 216
@@ -242,2 +243,3 @@ void KOTodoViewItem::stateChange(bool state)
242 } 243 }
244 if ( state ) {
243 QListViewItem * myChild = firstChild(); 245 QListViewItem * myChild = firstChild();
@@ -245,2 +247,3 @@ void KOTodoViewItem::stateChange(bool state)
245 while( myChild ) { 247 while( myChild ) {
248 //qDebug("stateCH ");
246 item = static_cast<KOTodoViewItem*>(myChild); 249 item = static_cast<KOTodoViewItem*>(myChild);
@@ -249,2 +252,7 @@ void KOTodoViewItem::stateChange(bool state)
249 } 252 }
253 } else {
254 QListViewItem * myChild = parent();
255 if ( myChild )
256 (static_cast<KOTodoViewItem*>(myChild))->stateChange(state);
257 }
250 mTodoView->modified(true); 258 mTodoView->modified(true);
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 7d04793..7f1de78 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -309,3 +309,7 @@ void Todo::setCompleted(const QDateTime &completed)
309{ 309{
310 qDebug("Todo::setCompleted "); 310 //qDebug("Todo::setCompleted ");
311 if ( mHasCompletedDate ) {
312 // qDebug("has completed data - return ");
313 return;
314 }
311 mHasCompletedDate = true; 315 mHasCompletedDate = true;