-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiepim/orecordlist.h | 12 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 25 |
3 files changed, 21 insertions, 18 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 21756c9..3a72881 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -69,5 +69,4 @@ bool OTodoAccessXML::load() { | |||
69 | element = element->nextChild(); | 69 | element = element->nextChild(); |
70 | } | 70 | } |
71 | return true; | ||
72 | }else { | 71 | }else { |
73 | qWarning("could not parse"); | 72 | qWarning("could not parse"); |
@@ -77,4 +76,5 @@ bool OTodoAccessXML::load() { | |||
77 | 76 | ||
78 | m_opened = true; | 77 | m_opened = true; |
78 | qWarning("Access %d" + m_events.count() ); | ||
79 | return true; | 79 | return true; |
80 | } | 80 | } |
diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h index 75bb33c..36728b8 100644 --- a/libopie2/opiepim/orecordlist.h +++ b/libopie2/opiepim/orecordlist.h | |||
@@ -41,5 +41,5 @@ public: | |||
41 | * use it like this T = (*it); | 41 | * use it like this T = (*it); |
42 | */ | 42 | */ |
43 | T &operator*(); | 43 | T operator*(); |
44 | ORecordListIterator &operator++(); | 44 | ORecordListIterator &operator++(); |
45 | ORecordListIterator &operator--(); | 45 | ORecordListIterator &operator--(); |
@@ -100,4 +100,5 @@ ORecordListIterator<T>::ORecordListIterator() { | |||
100 | m_temp = 0l; | 100 | m_temp = 0l; |
101 | m_end = true; | 101 | m_end = true; |
102 | m_record = T(); | ||
102 | } | 103 | } |
103 | template <class T> | 104 | template <class T> |
@@ -108,5 +109,5 @@ ORecordListIterator<T>::~ORecordListIterator() { | |||
108 | template <class T> | 109 | template <class T> |
109 | ORecordListIterator<T>::ORecordListIterator( const ORecordListIterator<T>& it) { | 110 | ORecordListIterator<T>::ORecordListIterator( const ORecordListIterator<T>& it) { |
110 | qWarning("ORecordListIterator"); | 111 | // qWarning("ORecordListIterator copy c'tor"); |
111 | m_uids = it.m_uids; | 112 | m_uids = it.m_uids; |
112 | m_current = it.m_current; | 113 | m_current = it.m_current; |
@@ -122,5 +123,5 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIter | |||
122 | m_temp = it.m_temp; | 123 | m_temp = it.m_temp; |
123 | m_end = it.m_end; | 124 | m_end = it.m_end; |
124 | m_record = it.m_record; | 125 | // m_record = it.m_record; |
125 | 126 | ||
126 | return *this; | 127 | return *this; |
@@ -128,6 +129,6 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIter | |||
128 | 129 | ||
129 | template <class T> | 130 | template <class T> |
130 | T &ORecordListIterator<T>::operator*() { | 131 | T ORecordListIterator<T>::operator*() { |
131 | qWarning("operator* %d %d", m_current, m_uids[m_current] ); | 132 | // qWarning("operator* %d %d", m_current, m_uids[m_current] ); |
132 | if (!m_end ) | 133 | if (!m_end ) |
133 | m_record = m_temp->find( m_uids[m_current] ); | 134 | m_record = m_temp->find( m_uids[m_current] ); |
@@ -194,5 +195,4 @@ ORecordList<T>::~ORecordList() { | |||
194 | template <class T> | 195 | template <class T> |
195 | ORecordList<T>::Iterator ORecordList<T>::begin() { | 196 | ORecordList<T>::Iterator ORecordList<T>::begin() { |
196 | qWarning("ORecordList::begin"); | ||
197 | Iterator it( m_ids, m_acc ); | 197 | Iterator it( m_ids, m_acc ); |
198 | return it; | 198 | return it; |
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index b3c14e6..cc46b21 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp | |||
@@ -37,10 +37,11 @@ OTodo::OTodo(const OTodo &event ) | |||
37 | { | 37 | { |
38 | data->ref(); | 38 | data->ref(); |
39 | qWarning("ref up"); | 39 | // qWarning("ref up"); |
40 | } | 40 | } |
41 | OTodo::~OTodo() { | 41 | OTodo::~OTodo() { |
42 | qWarning("~OTodo " + data->sum ); | 42 | |
43 | // qWarning("~OTodo " ); | ||
43 | if ( data->deref() ) { | 44 | if ( data->deref() ) { |
44 | qWarning("OTodo::dereffing"); | 45 | // qWarning("OTodo::dereffing"); |
45 | delete data; | 46 | delete data; |
46 | data = 0l; | 47 | data = 0l; |
@@ -55,5 +56,5 @@ OTodo::OTodo(bool completed, int priority, | |||
55 | : OPimRecord( uid ) | 56 | : OPimRecord( uid ) |
56 | { | 57 | { |
57 | qWarning("OTodoData " + summary); | 58 | // qWarning("OTodoData " + summary); |
58 | setCategories( category ); | 59 | setCategories( category ); |
59 | 60 | ||
@@ -78,10 +79,10 @@ OTodo::OTodo(bool completed, int priority, | |||
78 | : OPimRecord( uid ) | 79 | : OPimRecord( uid ) |
79 | { | 80 | { |
80 | qWarning("OTodoData" + summary); | 81 | // qWarning("OTodoData" + summary); |
81 | setCategories( idsFromString( category.join(";") ) ); | 82 | setCategories( idsFromString( category.join(";") ) ); |
82 | 83 | ||
83 | data = new OTodoData; | 84 | data = new OTodoData; |
84 | data->date = date; | ||
85 | 85 | ||
86 | data->date = date; | ||
86 | data->isCompleted = completed; | 87 | data->isCompleted = completed; |
87 | data->hasDate = hasDate; | 88 | data->hasDate = hasDate; |
@@ -161,4 +162,5 @@ void OTodo::setHasAlarmDateTime( bool hasAlarmDateTime ) | |||
161 | void OTodo::setDescription(const QString &desc ) | 162 | void OTodo::setDescription(const QString &desc ) |
162 | { | 163 | { |
164 | qWarning( "desc " + desc ); | ||
163 | changeOrModify(); | 165 | changeOrModify(); |
164 | data->desc = Qtopia::simplifyMultiLineSpace(desc ); | 166 | data->desc = Qtopia::simplifyMultiLineSpace(desc ); |
@@ -308,17 +310,18 @@ bool OTodo::operator==(const OTodo &toDoEvent )const | |||
308 | void OTodo::deref() { | 310 | void OTodo::deref() { |
309 | 311 | ||
310 | //qWarning("deref in ToDoEvent"); | 312 | // qWarning("deref in ToDoEvent"); |
311 | if ( data->deref() ) { | 313 | if ( data->deref() ) { |
312 | //qWarning("deleting"); | 314 | // qWarning("deleting"); |
313 | delete data; | 315 | delete data; |
314 | d= 0; | 316 | data= 0; |
315 | } | 317 | } |
316 | } | 318 | } |
317 | OTodo &OTodo::operator=(const OTodo &item ) | 319 | OTodo &OTodo::operator=(const OTodo &item ) |
318 | { | 320 | { |
319 | OPimRecord::operator=( item ); | 321 | // OPimRecord::operator=( item ); |
320 | //qWarning("operator= ref "); | 322 | //qWarning("operator= ref "); |
321 | item.data->ref(); | 323 | item.data->ref(); |
322 | deref(); | 324 | deref(); |
325 | data = item.data; | ||
323 | 326 | ||
324 | return *this; | 327 | return *this; |
@@ -356,5 +359,5 @@ QMap<QString, QString> OTodo::toExtraMap()const { | |||
356 | void OTodo::changeOrModify() { | 359 | void OTodo::changeOrModify() { |
357 | if ( data->count != 1 ) { | 360 | if ( data->count != 1 ) { |
358 | qWarning("changeOrModify"); | 361 | // qWarning("changeOrModify"); |
359 | data->deref(); | 362 | data->deref(); |
360 | OTodoData* d2 = new OTodoData(); | 363 | OTodoData* d2 = new OTodoData(); |