-rw-r--r-- | libopie/pim/opimnotifymanager.cpp | 4 | ||||
-rw-r--r-- | libopie/pim/otodo.cpp | 8 | ||||
-rw-r--r-- | libopie/pim/otodo.h | 8 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimnotifymanager.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 8 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.h | 8 |
6 files changed, 34 insertions, 6 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 @@ -70,3 +70,5 @@ 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 @@ -300,3 +300,3 @@ bool OTodo::hasNotifiers()const { if (!data->notifiers) return false; - return data->notifiers->isEmpty(); + return !data->notifiers->isEmpty(); } @@ -307,2 +307,8 @@ OPimNotifyManager& OTodo::notifiers() { } +const OPimNotifyManager& OTodo::notifiers()const{ + if (!data->notifiers ) + data->notifiers = new OPimNotifyManager; + + return (*data->notifiers); +} 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 @@ -177,3 +177,4 @@ public: /* - * check if the sharing is still fine!! -zecke + * FIXME check if the sharing is still fine!! -zecke + * ### CHECK If API is fine */ @@ -185,2 +186,7 @@ public: /** + * + */ + const OPimNotifyManager ¬ifiers()const; + + /** * reimplementations diff --git a/libopie2/opiepim/core/opimnotifymanager.cpp b/libopie2/opiepim/core/opimnotifymanager.cpp index 49af757..06b5987 100644 --- a/libopie2/opiepim/core/opimnotifymanager.cpp +++ b/libopie2/opiepim/core/opimnotifymanager.cpp @@ -70,3 +70,5 @@ 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/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index f3df119..a29d88e 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp @@ -300,3 +300,3 @@ bool OTodo::hasNotifiers()const { if (!data->notifiers) return false; - return data->notifiers->isEmpty(); + return !data->notifiers->isEmpty(); } @@ -307,2 +307,8 @@ OPimNotifyManager& OTodo::notifiers() { } +const OPimNotifyManager& OTodo::notifiers()const{ + if (!data->notifiers ) + data->notifiers = new OPimNotifyManager; + + return (*data->notifiers); +} diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h index 0e7c73f..4d5ee36 100644 --- a/libopie2/opiepim/otodo.h +++ b/libopie2/opiepim/otodo.h @@ -177,3 +177,4 @@ public: /* - * check if the sharing is still fine!! -zecke + * FIXME check if the sharing is still fine!! -zecke + * ### CHECK If API is fine */ @@ -185,2 +186,7 @@ public: /** + * + */ + const OPimNotifyManager ¬ifiers()const; + + /** * reimplementations |