[Marble-devel] Review Request 116531: Equality operator for GeoDataTour and related classes
Sanjiban Bairagya
sanjiban22393 at gmail.com
Sun Mar 2 16:21:06 UTC 2014
> On March 2, 2014, 4:05 p.m., Dennis Nienhüser wrote:
> > tests/TestEquality.cpp, line 390
> > <https://git.reviewboard.kde.org/r/116531/diff/4/?file=251409#file251409line390>
> >
> > You're comparing pointers here! That's not what we want to do. Furthermore the two tours should be equal at this point because you've added the same number of default constructed playlist primitives in the same order.
> >
> > There's an ownership problem in the way the primitives are used here. You need to create them on the heap because GeoDataTour will take ownership of them and delete them when it is destructed (missing in the code currently, but intended to behave like that). Therefore please change
> > GeoDataAnimatedUpdate animatedUpdate1;
> > to
> > GeoDataAnimatedUpdate* animatedUpdate1 = new GeoDataAnimatedUpdate;
> > and so on, and change
> > playlist1.addPrimitive( &animatedUpdate1 );
> > to
> > playlist1.addPrimitive( animatedUpdate1 );
> > etc.
> >
> > Similar for the compare/verify calls, change
> > QCOMPARE( &tour1, &tour1 );
> > to
> > QCOMPARE( tour1, tour1 );
> >
Okay, so it should also be
playlist1->addPrimitive( cue1 );
and so on
- Sanjiban
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116531/#review51670
-----------------------------------------------------------
On March 2, 2014, 1:48 p.m., Sanjiban Bairagya wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116531/
> -----------------------------------------------------------
>
> (Updated March 2, 2014, 1:48 p.m.)
>
>
> Review request for Marble.
>
>
> Bugs: 331671
> http://bugs.kde.org/show_bug.cgi?id=331671
>
>
> Repository: marble
>
>
> Description
> -------
>
> Added operator== and operator!= to GeoDataAnimatedUpdate, GeoDataSoundCue, GeoDataTourControl, GeoDataWait, GeoDataPlaylist and GeoDataTour
>
>
> Diffs
> -----
>
> src/lib/marble/geodata/data/GeoDataAnimatedUpdate.h 420eebe
> src/lib/marble/geodata/data/GeoDataAnimatedUpdate.cpp 980e856
> src/lib/marble/geodata/data/GeoDataPlaylist.h d7ac52a
> src/lib/marble/geodata/data/GeoDataPlaylist.cpp d23175c
> src/lib/marble/geodata/data/GeoDataSoundCue.h 3029ff6
> src/lib/marble/geodata/data/GeoDataSoundCue.cpp 3507e96
> src/lib/marble/geodata/data/GeoDataTour.h 91ae5d7
> src/lib/marble/geodata/data/GeoDataTour.cpp d9567a6
> src/lib/marble/geodata/data/GeoDataTourControl.h e801bde
> src/lib/marble/geodata/data/GeoDataTourControl.cpp cc6b5cd
> src/lib/marble/geodata/data/GeoDataUpdate.h 2a376fd
> src/lib/marble/geodata/data/GeoDataUpdate.cpp a1650ca
> src/lib/marble/geodata/data/GeoDataWait.h 0d1bbcc
> src/lib/marble/geodata/data/GeoDataWait.cpp ce55704
> tests/TestEquality.cpp 7a37b02
>
> Diff: https://git.reviewboard.kde.org/r/116531/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Sanjiban Bairagya
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20140302/9f4f418b/attachment.html>
More information about the Marble-devel
mailing list