summaryrefslogtreecommitdiff
path: root/libopie2/opiepim
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimnotifymanager.cpp4
-rw-r--r--libopie2/opiepim/otodo.cpp8
-rw-r--r--libopie2/opiepim/otodo.h8
3 files changed, 17 insertions, 3 deletions
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
@@ -59,14 +59,16 @@ void OPimNotifyManager::registerNotify( const OPimNotify& ) {
}
/* FIXME!!! */
/**
* same as above...
* Also implement Url model
* have a MainWindow....
*/
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
@@ -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;
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
@@ -166,32 +166,38 @@ public:
* A small summary of the todo
*/
QString summary() const;
/**
* @reimplemented
* Return this todoevent in a RichText formatted QString
*/
QString toRichText() const;
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
*/
/**
* return a reference to our notifiers...
*/
OPimNotifyManager &notifiers();
/**
+ *
+ */
+ const OPimNotifyManager &notifiers()const;
+
+ /**
* reimplementations
*/
QString type()const;
QString toShortText()const;
QMap<QString, QString> toExtraMap()const;
QString recordField(int id )const;
/**
* toMap puts all data into the map. int relates
* to ToDoEvent RecordFields enum
*/
QMap<int, QString> toMap()const;