Bug 333116

Summary: Equality operators for overlay related classes
Product: [Applications] marble Reporter: Dennis Nienhüser <nienhueser>
Component: generalAssignee: Sanjiban Bairagya <sanjiban22393>
Status: RESOLVED FIXED    
Severity: task CC: sanjiban22393
Priority: NOR Keywords: junior-jobs
Version: 1.8 (KDE 4.13)   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dennis Nienhüser 2014-04-06 08:28:30 UTC
Add operator== and operator!= to the classes GeoDataViewVolume, GeoDataVec2, GeoDataScreenOverlay, GeoDataPhotoOverlay and GeoDataGroundOverlay. Add a protected bool equals( const GeoDataOverlay &other ) const method to GeoDataOverlay which is called in operator== of GeoDataScreenOverlay, GeoDataPhotoOverlay and GeoDataGroundOverlay to avoid redundancy. Extend tests/TestEquality by a new unit test method for each of the classes (except of GeoDataOverlay) which verifies the implementation for several instances of each class.

Make sure to compile Marble with the BUILD_MARBLE_TESTS=TRUE option enabled and run the test case from the build folder (run tests/TestEquality). Note that operator!= should call operator==, see GeoDataAccuracy for an example. Submit a review request at https://git.reviewboard.kde.org.

Please leave a comment here (e.g. "I want to work on this task.") if you start working on this task to avoid multiple people working on it at the same time.
Comment 1 Sanjiban Bairagya 2014-04-06 08:59:40 UTC
I want to work on this task
Comment 2 Dennis Nienhüser 2014-04-10 14:24:35 UTC
Git commit e122bd94d0b3cd179b602f9ddae9a67484f50b93 by Dennis Nienhüser, on behalf of Sanjiban Bairagya.
Committed on 10/04/2014 at 14:23.
Pushed by nienhueser into branch 'master'.

Equality operators for overlay related classes
REVIEW: 117401

M  +19   -0    src/lib/marble/geodata/data/GeoDataGroundOverlay.cpp
M  +2    -1    src/lib/marble/geodata/data/GeoDataGroundOverlay.h
M  +8    -0    src/lib/marble/geodata/data/GeoDataOverlay.cpp
M  +3    -0    src/lib/marble/geodata/data/GeoDataOverlay.h
M  +15   -0    src/lib/marble/geodata/data/GeoDataPhotoOverlay.cpp
M  +2    -1    src/lib/marble/geodata/data/GeoDataPhotoOverlay.h
M  +15   -0    src/lib/marble/geodata/data/GeoDataScreenOverlay.cpp
M  +2    -1    src/lib/marble/geodata/data/GeoDataScreenOverlay.h
M  +11   -0    src/lib/marble/geodata/data/GeoDataVec2.cpp
M  +2    -1    src/lib/marble/geodata/data/GeoDataVec2.h
M  +15   -0    src/lib/marble/geodata/data/GeoDataViewVolume.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataViewVolume.h
M  +234  -0    tests/TestEquality.cpp

http://commits.kde.org/marble/e122bd94d0b3cd179b602f9ddae9a67484f50b93