summaryrefslogtreecommitdiff
path: root/libopie/pim/otodo.cpp
Unidiff
Diffstat (limited to 'libopie/pim/otodo.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/otodo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp
index f3df119..a29d88e 100644
--- a/libopie/pim/otodo.cpp
+++ b/libopie/pim/otodo.cpp
@@ -289,31 +289,37 @@ QString OTodo::toRichText() const
289 text += dueDate().toString(); 289 text += dueDate().toString();
290 text += "<br>"; 290 text += "<br>";
291 } 291 }
292 292
293 text += "<b>" + QObject::tr( "Category:") + "</b> "; 293 text += "<b>" + QObject::tr( "Category:") + "</b> ";
294 text += categoryNames( "Todo List" ).join(", "); 294 text += categoryNames( "Todo List" ).join(", ");
295 text += "<br>"; 295 text += "<br>";
296 296
297 return text; 297 return text;
298} 298}
299bool OTodo::hasNotifiers()const { 299bool OTodo::hasNotifiers()const {
300 if (!data->notifiers) return false; 300 if (!data->notifiers) return false;
301 return data->notifiers->isEmpty(); 301 return !data->notifiers->isEmpty();
302} 302}
303OPimNotifyManager& OTodo::notifiers() { 303OPimNotifyManager& OTodo::notifiers() {
304 if (!data->notifiers ) 304 if (!data->notifiers )
305 data->notifiers = new OPimNotifyManager; 305 data->notifiers = new OPimNotifyManager;
306 return (*data->notifiers); 306 return (*data->notifiers);
307} 307}
308const OPimNotifyManager& OTodo::notifiers()const{
309 if (!data->notifiers )
310 data->notifiers = new OPimNotifyManager;
311
312 return (*data->notifiers);
313}
308 314
309bool OTodo::operator<( const OTodo &toDoEvent )const{ 315bool OTodo::operator<( const OTodo &toDoEvent )const{
310 if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; 316 if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true;
311 if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; 317 if( !hasDueDate() && toDoEvent.hasDueDate() ) return false;
312 if( hasDueDate() && toDoEvent.hasDueDate() ){ 318 if( hasDueDate() && toDoEvent.hasDueDate() ){
313 if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide 319 if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide
314 return priority() < toDoEvent.priority(); 320 return priority() < toDoEvent.priority();
315 }else{ 321 }else{
316 return dueDate() < toDoEvent.dueDate(); 322 return dueDate() < toDoEvent.dueDate();
317 } 323 }
318 } 324 }
319 return false; 325 return false;