[Marble-devel] Review Request 114353: Playback of KML Tours

Bernhard Beschow bbeschow at cs.tu-berlin.de
Tue Dec 17 16:32:44 UTC 2013



> On Dec. 16, 2013, 8:39 p.m., Bernhard Beschow wrote:
> > src/lib/marble/TourWidget.cpp, line 74
> > <http://git.reviewboard.kde.org/r/114353/diff/6/?file=225579#file225579line74>
> >
> >     Is there any technical reason why you didn't turn this into a value, i.e. remove the * in front, like I suggested before? If not, please fix. The advantage of m_playback being a value is that you always know that m_playback exists and that you can wire up its signals in the c'tor of TourWidget already.
> >     
> >     Of course, this approach prevents you from passing a GeoDataTour object to its constructor. So you'd have to add e.g. TourPlayback::setTour() and make sure that TourPlayback won't crash if null is passed as tour.
> >     
> >     An additional advantage of this approach is that TourPlayback encapsulates all logic for playing a tour. This not only allows us to add new GUIs more easily, but also frees clients of TourPlayback do deal with null-pointer tours themselves.
> 
> Illya Kovalevskyy wrote:
>     Now I got it, sorry for dropping your previous issue, I just misunderstood you (it was midnight and so on)

No problem. In order to avoid null-pointer issues inside TourPlayback, you could assign an empty (dummy) GeoDataTour object when you get a null-pointer as input.

Note that TourPlayback should not take ownership of the GeoDataTour object it receives. However, if you create a dummy object, you must delete it at some point. You can solve this by having a static GeoDataTour object which you assign when the user passes a null-pointer.


- Bernhard


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114353/#review45810
-----------------------------------------------------------


On Dec. 16, 2013, 6:24 p.m., Illya Kovalevskyy wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114353/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2013, 6:24 p.m.)
> 
> 
> Review request for Marble and Dennis Nienhüser.
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> According to Google Code-In 2013 task (http://www.google-melange.com/gci/task/view/google/gci2013/5813452580847616):
> 
> KML tours are played now by TourPlayback class and integrated into TourWidget. It works well and no bugs detected
> 
> 
> Diffs
> -----
> 
>   src/lib/marble/libmarble.qrc 064e1b3 
>   src/lib/marble/TourWidget.cpp d595418 
>   src/lib/marble/TourWidget.ui 874ecfb 
>   src/lib/marble/TourWidget.h c18c849 
>   src/lib/marble/TourPlayback.cpp PRE-CREATION 
>   src/lib/marble/TourPlayback.h PRE-CREATION 
>   src/lib/marble/CMakeLists.txt fd5bd3a 
>   src/apps/marble-ui/icons/16x16/media-record.png PRE-CREATION 
>   src/apps/marble-ui/icons/16x16/media-playback-stop.png PRE-CREATION 
>   src/apps/marble-ui/icons/16x16/media-playback-start.png PRE-CREATION 
>   src/apps/marble-ui/icons/16x16/media-playback-pause.png PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/114353/diff/
> 
> 
> Testing
> -------
> 
> Official KML examples, unit-tests
> 
> 
> Thanks,
> 
> Illya Kovalevskyy
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20131217/15cff0ac/attachment.html>


More information about the Marble-devel mailing list