summaryrefslogtreecommitdiff
path: root/libopie/pim/otodo.cpp
authorzecke <zecke>2003-05-12 13:12:45 (UTC)
committer zecke <zecke>2003-05-12 13:12:45 (UTC)
commit52b74f396416cc1b87d76a0541617512da22157a (patch) (side-by-side diff)
treedbec31fb8b79cdb6fbe50f588aac280a8fdc2bfa /libopie/pim/otodo.cpp
parent64f9f964ef690806378d639118f79539a8934d40 (diff)
downloadopie-52b74f396416cc1b87d76a0541617512da22157a.zip
opie-52b74f396416cc1b87d76a0541617512da22157a.tar.gz
opie-52b74f396416cc1b87d76a0541617512da22157a.tar.bz2
fix up OTodo::hasNotifiers
add a const notifiers() function and fix OPimNotifyManager::isEmpty
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
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;