Diffstat (limited to 'libopie2/opiepim/core/opimtodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimtodo.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libopie2/opiepim/core/opimtodo.cpp b/libopie2/opiepim/core/opimtodo.cpp index 47433e0..27b36a6 100644 --- a/libopie2/opiepim/core/opimtodo.cpp +++ b/libopie2/opiepim/core/opimtodo.cpp | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <opie2/opimmaintainer.h> | 35 | #include <opie2/opimmaintainer.h> |
36 | #include <opie2/opimnotifymanager.h> | 36 | #include <opie2/opimnotifymanager.h> |
37 | #include <opie2/opimresolver.h> | 37 | #include <opie2/opimresolver.h> |
38 | #include <opie2/odebug.h> | ||
39 | |||
38 | #include <qpe/palmtopuidgen.h> | 40 | #include <qpe/palmtopuidgen.h> |
39 | #include <qpe/palmtoprecord.h> | 41 | #include <qpe/palmtoprecord.h> |
40 | #include <qpe/categories.h> | 42 | #include <qpe/categories.h> |
@@ -85,17 +87,17 @@ OPimTodo::OPimTodo( const OPimTodo &event ) | |||
85 | : OPimRecord( event ), data( event.data ) | 87 | : OPimRecord( event ), data( event.data ) |
86 | { | 88 | { |
87 | data->ref(); | 89 | data->ref(); |
88 | // qWarning("ref up"); | 90 | // owarn << "ref up" << oendl; |
89 | } | 91 | } |
90 | 92 | ||
91 | 93 | ||
92 | OPimTodo::~OPimTodo() | 94 | OPimTodo::~OPimTodo() |
93 | { | 95 | { |
94 | 96 | ||
95 | // qWarning("~OPimTodo " ); | 97 | // owarn << "~OPimTodo " << oendl; |
96 | if ( data->deref() ) | 98 | if ( data->deref() ) |
97 | { | 99 | { |
98 | // qWarning("OPimTodo::dereffing"); | 100 | // owarn << "OPimTodo::dereffing" << oendl; |
99 | delete data; | 101 | delete data; |
100 | data = 0l; | 102 | data = 0l; |
101 | } | 103 | } |
@@ -110,7 +112,7 @@ OPimTodo::OPimTodo( bool completed, int priority, | |||
110 | bool hasDate, QDate date, int uid ) | 112 | bool hasDate, QDate date, int uid ) |
111 | : OPimRecord( uid ) | 113 | : OPimRecord( uid ) |
112 | { | 114 | { |
113 | // qWarning("OPimTodoData " + summary); | 115 | // owarn << "OPimTodoData " + summary << oendl; |
114 | setCategories( category ); | 116 | setCategories( category ); |
115 | 117 | ||
116 | data = new OPimTodoData; | 118 | data = new OPimTodoData; |
@@ -133,7 +135,7 @@ OPimTodo::OPimTodo( bool completed, int priority, | |||
133 | bool hasDate, QDate date, int uid ) | 135 | bool hasDate, QDate date, int uid ) |
134 | : OPimRecord( uid ) | 136 | : OPimRecord( uid ) |
135 | { | 137 | { |
136 | // qWarning("OPimTodoData" + summary); | 138 | // owarn << "OPimTodoData" + summary << oendl; |
137 | setCategories( idsFromString( category.join( ";" ) ) ); | 139 | setCategories( idsFromString( category.join( ";" ) ) ); |
138 | 140 | ||
139 | data = new OPimTodoData; | 141 | data = new OPimTodoData; |
@@ -306,7 +308,7 @@ void OPimTodo::setHasDueDate( bool hasDate ) | |||
306 | 308 | ||
307 | void OPimTodo::setDescription( const QString &desc ) | 309 | void OPimTodo::setDescription( const QString &desc ) |
308 | { | 310 | { |
309 | // qWarning( "desc " + desc ); | 311 | // owarn << "desc " + desc << oendl; |
310 | changeOrModify(); | 312 | changeOrModify(); |
311 | data->desc = Qtopia::simplifyMultiLineSpace( desc ); | 313 | data->desc = Qtopia::simplifyMultiLineSpace( desc ); |
312 | } | 314 | } |
@@ -591,10 +593,10 @@ bool OPimTodo::operator==( const OPimTodo &toDoEvent ) const | |||
591 | void OPimTodo::deref() | 593 | void OPimTodo::deref() |
592 | { | 594 | { |
593 | 595 | ||
594 | // qWarning("deref in ToDoEvent"); | 596 | // owarn << "deref in ToDoEvent" << oendl; |
595 | if ( data->deref() ) | 597 | if ( data->deref() ) |
596 | { | 598 | { |
597 | // qWarning("deleting"); | 599 | // owarn << "deleting" << oendl; |
598 | delete data; | 600 | delete data; |
599 | data = 0; | 601 | data = 0; |
600 | } | 602 | } |
@@ -606,7 +608,7 @@ OPimTodo &OPimTodo::operator=( const OPimTodo &item ) | |||
606 | if ( this == &item ) return * this; | 608 | if ( this == &item ) return * this; |
607 | 609 | ||
608 | OPimRecord::operator=( item ); | 610 | OPimRecord::operator=( item ); |
609 | //qWarning("operator= ref "); | 611 | //owarn << "operator= ref " << oendl; |
610 | item.data->ref(); | 612 | item.data->ref(); |
611 | deref(); | 613 | deref(); |
612 | data = item.data; | 614 | data = item.data; |
@@ -649,7 +651,7 @@ void OPimTodo::changeOrModify() | |||
649 | { | 651 | { |
650 | if ( data->count != 1 ) | 652 | if ( data->count != 1 ) |
651 | { | 653 | { |
652 | qWarning( "changeOrModify" ); | 654 | owarn << "changeOrModify" << oendl; |
653 | data->deref(); | 655 | data->deref(); |
654 | OPimTodoData* d2 = new OPimTodoData(); | 656 | OPimTodoData* d2 = new OPimTodoData(); |
655 | copy( data, d2 ); | 657 | copy( data, d2 ); |