summaryrefslogtreecommitdiff
authorzecke <zecke>2002-10-18 03:12:54 (UTC)
committer zecke <zecke>2002-10-18 03:12:54 (UTC)
commit07a1cb4baaf544e0e594040bbe8e5872ccb34c0f (patch) (unidiff)
treeba556d2f587a65bfc3b15fc844a9383f5ef66c9e
parent86b3550348cf896b568e98d21da577c3f35a1a4a (diff)
downloadopie-07a1cb4baaf544e0e594040bbe8e5872ccb34c0f.zip
opie-07a1cb4baaf544e0e594040bbe8e5872ccb34c0f.tar.gz
opie-07a1cb4baaf544e0e594040bbe8e5872ccb34c0f.tar.bz2
Fix the behaviour of isOverDue.
We currently check if the Record got a DueDate and then do some calculations. I added a check to see if the item isCompleted. If it is completed it can not be overdue Stefan: Only one item left which is overdue ;)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/otodo.cpp2
-rw-r--r--libopie2/opiepim/otodo.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp
index 6dd4c0e..765d5a9 100644
--- a/libopie/pim/otodo.cpp
+++ b/libopie/pim/otodo.cpp
@@ -187,7 +187,7 @@ void OTodo::setAlarmDateTime( const QDateTime& alarm )
187} 187}
188bool OTodo::isOverdue( ) 188bool OTodo::isOverdue( )
189{ 189{
190 if( data->hasDate ) 190 if( data->hasDate && !data->isCompleted)
191 return QDate::currentDate() > data->date; 191 return QDate::currentDate() > data->date;
192 return false; 192 return false;
193} 193}
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp
index 6dd4c0e..765d5a9 100644
--- a/libopie2/opiepim/otodo.cpp
+++ b/libopie2/opiepim/otodo.cpp
@@ -187,7 +187,7 @@ void OTodo::setAlarmDateTime( const QDateTime& alarm )
187} 187}
188bool OTodo::isOverdue( ) 188bool OTodo::isOverdue( )
189{ 189{
190 if( data->hasDate ) 190 if( data->hasDate && !data->isCompleted)
191 return QDate::currentDate() > data->date; 191 return QDate::currentDate() > data->date;
192 return false; 192 return false;
193} 193}