Bug 333117

Summary: Equality operators for time related classes
Product: [Applications] marble Reporter: Dennis Nienhüser <nienhueser>
Component: generalAssignee: Cruceru Calin-Cristian <crucerucalincristian>
Status: RESOLVED FIXED    
Severity: task CC: crucerucalincristian
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:43:30 UTC
Add operator== and operator!= to the classes GeoDataTimeSpan and GeoDataTimeStamp. Change the protected bool equals method of GeoDataObject to become virtual, and overwrite it in GeoDataAbstractView. Have its implementation check the time members and altitude mode. This change will affect operator== of GeoDataCamera. Make sure that TestEquality still succeeds. Extend TestEquality by a new unit test method for GeoDataTimeSpan and GeoDataTimeStamp 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 Cruceru Calin-Cristian 2014-04-06 09:41:01 UTC
I want to work on this.
Comment 2 Dennis Nienhüser 2014-04-09 20:32:39 UTC
Git commit c40b1bd55a459491a35ebe382d7f1ab4f8d99a17 by Dennis Nienhüser, on behalf of Cruceru Calin-Cristian.
Committed on 09/04/2014 at 20:19.
Pushed by nienhueser into branch 'master'.

Equality operators for time related classes
REVIEW: 117408

M  +9    -0    src/lib/marble/geodata/data/GeoDataAbstractView.cpp
M  +5    -0    src/lib/marble/geodata/data/GeoDataAbstractView.h
M  +2    -1    src/lib/marble/geodata/data/GeoDataGeometry.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataGeometry.h
M  +1    -1    src/lib/marble/geodata/data/GeoDataObject.h
M  +1    -1    src/lib/marble/geodata/data/GeoDataPoint.cpp
M  +12   -0    src/lib/marble/geodata/data/GeoDataTimeSpan.cpp
M  +6    -0    src/lib/marble/geodata/data/GeoDataTimeSpan.h
M  +13   -0    src/lib/marble/geodata/data/GeoDataTimeStamp.cpp
M  +7    -0    src/lib/marble/geodata/data/GeoDataTimeStamp.h
M  +106  -0    tests/TestEquality.cpp

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