From 1537ccb435ca725c793db6e94e0b9e83484b57e7 Mon Sep 17 00:00:00 2001 From: zecke Date: Sun, 13 Apr 2003 16:55:34 +0000 Subject: OEvent/OTodo compare by address and not by value.. ODatebookAccess: clear does change it too --- diff --git a/libopie/pim/odatebookaccessbackend_xml.cpp b/libopie/pim/odatebookaccessbackend_xml.cpp index 11e19d9..a0ae7b7 100644 --- a/libopie/pim/odatebookaccessbackend_xml.cpp +++ b/libopie/pim/odatebookaccessbackend_xml.cpp @@ -248,6 +248,7 @@ QArray ODateBookAccessBackend_XML::queryByExample(const OEvent&, int, cons return QArray(); } void ODateBookAccessBackend_XML::clear() { + m_changed = true; m_raw.clear(); m_rep.clear(); } diff --git a/libopie/pim/oevent.cpp b/libopie/pim/oevent.cpp index c3eeee2..56ea10d 100644 --- a/libopie/pim/oevent.cpp +++ b/libopie/pim/oevent.cpp @@ -82,7 +82,7 @@ OEvent::~OEvent() { } } OEvent& OEvent::operator=( const OEvent& ev) { - if ( *this == ev ) return *this; + if ( this == &ev ) return *this; OPimRecord::operator=( ev ); ev.data->ref(); diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index 049359e..ea66d39 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp @@ -340,7 +340,7 @@ void OTodo::deref() { } OTodo &OTodo::operator=(const OTodo &item ) { - if ( *this == item ) return *this; + if ( this == &item ) return *this; OPimRecord::operator=( item ); //qWarning("operator= ref "); diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp index 11e19d9..a0ae7b7 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp @@ -248,6 +248,7 @@ QArray ODateBookAccessBackend_XML::queryByExample(const OEvent&, int, cons return QArray(); } void ODateBookAccessBackend_XML::clear() { + m_changed = true; m_raw.clear(); m_rep.clear(); } diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp index c3eeee2..56ea10d 100644 --- a/libopie2/opiepim/oevent.cpp +++ b/libopie2/opiepim/oevent.cpp @@ -82,7 +82,7 @@ OEvent::~OEvent() { } } OEvent& OEvent::operator=( const OEvent& ev) { - if ( *this == ev ) return *this; + if ( this == &ev ) return *this; OPimRecord::operator=( ev ); ev.data->ref(); diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index 049359e..ea66d39 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp @@ -340,7 +340,7 @@ void OTodo::deref() { } OTodo &OTodo::operator=(const OTodo &item ) { - if ( *this == item ) return *this; + if ( this == &item ) return *this; OPimRecord::operator=( item ); //qWarning("operator= ref "); -- cgit v0.9.0.2