<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/114353/">http://git.reviewboard.kde.org/r/114353/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On December 8th, 2013, 5:56 p.m. UTC, <b>Dennis Nienhüser</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/114353/diff/1/?file=223296#file223296line155" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/TourPlayback.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">155</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">GeoDataSoundCue</span> <span class="o">*</span><span class="n">cue</span> <span class="o">=</span> <span class="n">m_cues</span><span class="p">.</span><span class="n">first</span><span class="p">().</span><span class="n">second</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">should check that m_cues is not empty
Also m_cues needs to be cleared when playback finishes</pre>
</blockquote>
<p>On December 8th, 2013, 7:35 p.m. UTC, <b>Illya Kovalevskyy</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It can't be empty, actually</pre>
</blockquote>
<p>On December 9th, 2013, 4:56 p.m. UTC, <b>Mihail Ivchenko</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.
</pre>
<br />
<p>- Dennis</p>
<br />
<p>On December 8th, 2013, 7:18 p.m. UTC, Illya Kovalevskyy wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Marble and Dennis Nienhüser.</div>
<div>By Illya Kovalevskyy.</div>
<p style="color: grey;"><i>Updated Dec. 8, 2013, 7:18 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
marble
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Official KML examples, unit-tests</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/lib/marble/CMakeLists.txt <span style="color: grey">(fd5bd3a)</span></li>
<li>src/lib/marble/TourPlayback.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/lib/marble/TourPlayback.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/lib/marble/TourPlayback_p.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/lib/marble/TourWidget.h <span style="color: grey">(c18c849)</span></li>
<li>src/lib/marble/TourWidget.cpp <span style="color: grey">(8bd7aa6)</span></li>
<li>src/lib/marble/TourWidget.ui <span style="color: grey">(874ecfb)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/114353/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>