summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/otodo.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/otodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/otodo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp
index f3df119..a29d88e 100644
--- a/libopie2/opiepim/otodo.cpp
+++ b/libopie2/opiepim/otodo.cpp
@@ -289,31 +289,37 @@ QString OTodo::toRichText() const
text += dueDate().toString();
text += "<br>";
}
text += "<b>" + QObject::tr( "Category:") + "</b> ";
text += categoryNames( "Todo List" ).join(", ");
text += "<br>";
return text;
}
bool OTodo::hasNotifiers()const {
if (!data->notifiers) return false;
- return data->notifiers->isEmpty();
+ return !data->notifiers->isEmpty();
}
OPimNotifyManager& OTodo::notifiers() {
if (!data->notifiers )
data->notifiers = new OPimNotifyManager;
return (*data->notifiers);
}
+const OPimNotifyManager& OTodo::notifiers()const{
+ if (!data->notifiers )
+ data->notifiers = new OPimNotifyManager;
+
+ return (*data->notifiers);
+}
bool OTodo::operator<( const OTodo &toDoEvent )const{
if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true;
if( !hasDueDate() && toDoEvent.hasDueDate() ) return false;
if( hasDueDate() && toDoEvent.hasDueDate() ){
if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide
return priority() < toDoEvent.priority();
}else{
return dueDate() < toDoEvent.dueDate();
}
}
return false;