author | zecke <zecke> | 2002-09-22 23:32:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-22 23:32:49 (UTC) |
commit | d7098ef25f7f4ebe5678061aa3a3c0bd1f077f7f (patch) (side-by-side diff) | |
tree | 5ff52b48fd514c6f24da6d3204bc98b66c48a652 /libopie/pim/otodo.cpp | |
parent | 4f142e98ee63e88fa0df61161b93228ee719d551 (diff) | |
download | opie-d7098ef25f7f4ebe5678061aa3a3c0bd1f077f7f.zip opie-d7098ef25f7f4ebe5678061aa3a3c0bd1f077f7f.tar.gz opie-d7098ef25f7f4ebe5678061aa3a3c0bd1f077f7f.tar.bz2 |
Two brown paper bags later OTodo is ok again... pointers can be so fscking awesome
I had problems with QShared because I forgot to copy it in &operator=
And the other one was d = 0
-rw-r--r-- | libopie/pim/otodo.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
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 @@ -38,8 +38,9 @@ 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; @@ -56,3 +57,3 @@ OTodo::OTodo(bool completed, int priority, { - qWarning("OTodoData " + summary); +// qWarning("OTodoData " + summary); setCategories( category ); @@ -79,3 +80,3 @@ OTodo::OTodo(bool completed, int priority, { - qWarning("OTodoData" + summary); +// qWarning("OTodoData" + summary); setCategories( idsFromString( category.join(";") ) ); @@ -83,4 +84,4 @@ OTodo::OTodo(bool completed, int priority, data = new OTodoData; - data->date = date; + data->date = date; data->isCompleted = completed; @@ -162,2 +163,3 @@ void OTodo::setDescription(const QString &desc ) { + qWarning( "desc " + desc ); changeOrModify(); @@ -313,3 +315,3 @@ void OTodo::deref() { delete data; - d= 0; + data= 0; } @@ -318,3 +320,3 @@ OTodo &OTodo::operator=(const OTodo &item ) { - OPimRecord::operator=( item ); +// OPimRecord::operator=( item ); //qWarning("operator= ref "); @@ -322,2 +324,3 @@ OTodo &OTodo::operator=(const OTodo &item ) deref(); + data = item.data; @@ -357,3 +360,3 @@ void OTodo::changeOrModify() { if ( data->count != 1 ) { - qWarning("changeOrModify"); +// qWarning("changeOrModify"); data->deref(); |