[FIX] Equality operators for GeoDataPlacemark + Other issues
Review Request #118011 - Created May 5, 2014 and submitted
The previous implementation of operator== in GeoDataPlacemark was, as even the documentation said, comparing the 2 private pointers of each instance of the class. I thought that this implementation would be more appropriate, but there are still some issues, especially caused by the m_geometry pointer: - how should this be compared to the other's m_geometry? - even though it is not regarded to what for I opened this bug review request, we should think of that //FIXME comment within the GeoDataPlacemark( const GeoDataPlacemark &other ) constructor because I think it will cause problems when we will finish implementing operators== and we will start testing on real .kml files. - shouldn't m_geometry be deleted within the destructor, since its parent is the current object? I see that it is deleted when set a new one geometry, but not in destructor; maybe I didn't understand this correctly.
For m_geometry comparison, your second patch looks fine. It is deleted in ~GeoDataPlacemarkPrivate which is called from ~GeoDataFeature because the d-pointer is shared in the class hierarchy. Keeping code complexity low wasn't high on the priority list of geodata I'm afraid :-P