-rw-r--r-- | libopie/pim/otodo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index b4d4aa9..049359e 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp @@ -327,32 +327,34 @@ bool OTodo::operator==(const OTodo &toDoEvent )const if ( data->maintainer != toDoEvent.data->maintainer ) return false; return OPimRecord::operator==( toDoEvent ); } void OTodo::deref() { // qWarning("deref in ToDoEvent"); if ( data->deref() ) { // qWarning("deleting"); delete data; data= 0; } } OTodo &OTodo::operator=(const OTodo &item ) { + if ( *this == item ) return *this; + OPimRecord::operator=( item ); //qWarning("operator= ref "); item.data->ref(); deref(); data = item.data; return *this; } QMap<int, QString> OTodo::toMap() const { QMap<int, QString> map; map.insert( Uid, QString::number( uid() ) ); map.insert( Category, idsToString( categories() ) ); map.insert( HasDate, QString::number( data->hasDate ) ); map.insert( Completed, QString::number( data->isCompleted ) ); |