summaryrefslogtreecommitdiff
path: root/libopie/pim
Side-by-side diff
Diffstat (limited to 'libopie/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/orecordlist.h12
-rw-r--r--libopie/pim/otodo.cpp25
-rw-r--r--libopie/pim/otodoaccessxml.cpp2
3 files changed, 21 insertions, 18 deletions
diff --git a/libopie/pim/orecordlist.h b/libopie/pim/orecordlist.h
index 75bb33c..36728b8 100644
--- a/libopie/pim/orecordlist.h
+++ b/libopie/pim/orecordlist.h
@@ -41,5 +41,5 @@ public:
* use it like this T = (*it);
*/
- T &operator*();
+ T operator*();
ORecordListIterator &operator++();
ORecordListIterator &operator--();
@@ -100,4 +100,5 @@ ORecordListIterator<T>::ORecordListIterator() {
m_temp = 0l;
m_end = true;
+ m_record = T();
}
template <class T>
@@ -108,5 +109,5 @@ ORecordListIterator<T>::~ORecordListIterator() {
template <class T>
ORecordListIterator<T>::ORecordListIterator( const ORecordListIterator<T>& it) {
- qWarning("ORecordListIterator");
+// qWarning("ORecordListIterator copy c'tor");
m_uids = it.m_uids;
m_current = it.m_current;
@@ -122,5 +123,5 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIter
m_temp = it.m_temp;
m_end = it.m_end;
- m_record = it.m_record;
+// m_record = it.m_record;
return *this;
@@ -128,6 +129,6 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIter
template <class T>
-T &ORecordListIterator<T>::operator*() {
- qWarning("operator* %d %d", m_current, m_uids[m_current] );
+T ORecordListIterator<T>::operator*() {
+// qWarning("operator* %d %d", m_current, m_uids[m_current] );
if (!m_end )
m_record = m_temp->find( m_uids[m_current] );
@@ -194,5 +195,4 @@ ORecordList<T>::~ORecordList() {
template <class T>
ORecordList<T>::Iterator ORecordList<T>::begin() {
- qWarning("ORecordList::begin");
Iterator it( m_ids, m_acc );
return it;
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp
index b3c14e6..cc46b21 100644
--- a/libopie/pim/otodo.cpp
+++ b/libopie/pim/otodo.cpp
@@ -37,10 +37,11 @@ OTodo::OTodo(const OTodo &event )
{
data->ref();
- qWarning("ref up");
+// qWarning("ref up");
}
OTodo::~OTodo() {
- qWarning("~OTodo " + data->sum );
+
+// qWarning("~OTodo " );
if ( data->deref() ) {
- qWarning("OTodo::dereffing");
+// qWarning("OTodo::dereffing");
delete data;
data = 0l;
@@ -55,5 +56,5 @@ OTodo::OTodo(bool completed, int priority,
: OPimRecord( uid )
{
- qWarning("OTodoData " + summary);
+// qWarning("OTodoData " + summary);
setCategories( category );
@@ -78,10 +79,10 @@ OTodo::OTodo(bool completed, int priority,
: OPimRecord( uid )
{
- qWarning("OTodoData" + summary);
+// qWarning("OTodoData" + summary);
setCategories( idsFromString( category.join(";") ) );
data = new OTodoData;
- data->date = date;
+ data->date = date;
data->isCompleted = completed;
data->hasDate = hasDate;
@@ -161,4 +162,5 @@ void OTodo::setHasAlarmDateTime( bool hasAlarmDateTime )
void OTodo::setDescription(const QString &desc )
{
+ qWarning( "desc " + desc );
changeOrModify();
data->desc = Qtopia::simplifyMultiLineSpace(desc );
@@ -308,17 +310,18 @@ bool OTodo::operator==(const OTodo &toDoEvent )const
void OTodo::deref() {
- //qWarning("deref in ToDoEvent");
+// qWarning("deref in ToDoEvent");
if ( data->deref() ) {
- //qWarning("deleting");
+// qWarning("deleting");
delete data;
- d= 0;
+ data= 0;
}
}
OTodo &OTodo::operator=(const OTodo &item )
{
- OPimRecord::operator=( item );
+// OPimRecord::operator=( item );
//qWarning("operator= ref ");
item.data->ref();
deref();
+ data = item.data;
return *this;
@@ -356,5 +359,5 @@ QMap<QString, QString> OTodo::toExtraMap()const {
void OTodo::changeOrModify() {
if ( data->count != 1 ) {
- qWarning("changeOrModify");
+// qWarning("changeOrModify");
data->deref();
OTodoData* d2 = new OTodoData();
diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp
index 21756c9..3a72881 100644
--- a/libopie/pim/otodoaccessxml.cpp
+++ b/libopie/pim/otodoaccessxml.cpp
@@ -69,5 +69,4 @@ bool OTodoAccessXML::load() {
element = element->nextChild();
}
- return true;
}else {
qWarning("could not parse");
@@ -77,4 +76,5 @@ bool OTodoAccessXML::load() {
m_opened = true;
+ qWarning("Access %d" + m_events.count() );
return true;
}