summaryrefslogtreecommitdiff
path: root/libopie/pim
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
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') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/opimnotifymanager.cpp4
-rw-r--r--libopie/pim/otodo.cpp8
-rw-r--r--libopie/pim/otodo.h8
3 files changed, 17 insertions, 3 deletions
diff --git a/libopie/pim/opimnotifymanager.cpp b/libopie/pim/opimnotifymanager.cpp
index 49af757..06b5987 100644
--- a/libopie/pim/opimnotifymanager.cpp
+++ b/libopie/pim/opimnotifymanager.cpp
@@ -69,4 +69,6 @@ void OPimNotifyManager::deregister( const OPimNotify& ) {
}
bool OPimNotifyManager::isEmpty()const {
- return ( m_rem.isEmpty() && m_al.isEmpty() );
+ qWarning("is Empty called on OPimNotifyManager %d %d", m_rem.count(), m_al.count() );
+ if ( m_rem.isEmpty() && m_al.isEmpty() ) return true;
+ else return false;
}
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
@@ -299,5 +299,5 @@ QString OTodo::toRichText() const
bool OTodo::hasNotifiers()const {
if (!data->notifiers) return false;
- return data->notifiers->isEmpty();
+ return !data->notifiers->isEmpty();
}
OPimNotifyManager& OTodo::notifiers() {
@@ -306,4 +306,10 @@ OPimNotifyManager& OTodo::notifiers() {
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{
diff --git a/libopie/pim/otodo.h b/libopie/pim/otodo.h
index 0e7c73f..4d5ee36 100644
--- a/libopie/pim/otodo.h
+++ b/libopie/pim/otodo.h
@@ -176,5 +176,6 @@ public:
bool hasNotifiers()const;
/*
- * check if the sharing is still fine!! -zecke
+ * FIXME check if the sharing is still fine!! -zecke
+ * ### CHECK If API is fine
*/
/**
@@ -184,4 +185,9 @@ public:
/**
+ *
+ */
+ const OPimNotifyManager &notifiers()const;
+
+ /**
* reimplementations
*/