[Marble-devel] Review Request 114353: Playback of KML Tours
Dennis Nienhüser
earthwings at gentoo.org
Mon Dec 9 17:01:00 UTC 2013
> On Dec. 8, 2013, 5:56 p.m., Dennis Nienhüser wrote:
> > src/lib/marble/TourPlayback.cpp, line 155
> > <http://git.reviewboard.kde.org/r/114353/diff/1/?file=223296#file223296line155>
> >
> > should check that m_cues is not empty
> > Also m_cues needs to be cleared when playback finishes
>
> Illya Kovalevskyy wrote:
> It can't be empty, actually
>
> Mihail Ivchenko wrote:
> I think, it can be empty if cue have a big delayedStar ( playSoundCue isn't called yet) and user pressed pause\play button. play() function will clear m_cues, so when playSoundCue will be called m_cues will be empty.
Sure it can:
(00:00:01) Tour is playing
(00:00:01) SoundCue inserted with delayed start of 6 seconds
(00:00:05) Users clicks pause
(00:00:06) Users clicks play
(00:00:06) Tour is playing (d->m_playback is reused, so same instance)
(00:00:06) m_cues is cleared
...
(00:00:07) SoundCue timer returns and calls m_cues.first()
Generally I'm a friend of not relying on code assumptions because later refactorings often turn them wrong (or more positive: check things now and refactoring/extending is much more painless). At least insert Q_ASSERT to document which assumption the code relies on.
- Dennis
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114353/#review45356
-----------------------------------------------------------
On Dec. 8, 2013, 7:18 p.m., Illya Kovalevskyy wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114353/
> -----------------------------------------------------------
>
> (Updated Dec. 8, 2013, 7:18 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/CMakeLists.txt fd5bd3a
> src/lib/marble/TourPlayback.h PRE-CREATION
> src/lib/marble/TourPlayback.cpp PRE-CREATION
> src/lib/marble/TourPlayback_p.h PRE-CREATION
> src/lib/marble/TourWidget.h c18c849
> src/lib/marble/TourWidget.cpp 8bd7aa6
> src/lib/marble/TourWidget.ui 874ecfb
>
> 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/20131209/cbaadba1/attachment.html>
More information about the Marble-devel
mailing list