<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="https://git.reviewboard.kde.org/r/117701/">https://git.reviewboard.kde.org/r/117701/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 23rd, 2014, 1:03 p.m. UTC, <b>Thomas Lübking</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="https://git.reviewboard.kde.org/r/117701/diff/1/?file=267866#file267866line413" style="color: black; font-weight: bold; text-decoration: underline;">src/kstartupinfo.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">413</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="n">startups</span><span class="p">.</span><span class="n">erase</span><span class="p">(</span><span class="n">it</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;">this is somehow not equivalent to the other variant (ignores silent/uninited) - the iterator should perhaps go with a map pointer/reference to stress this (and as a matching map usage is required anyway)</pre>
</blockquote>
<p>On April 23rd, 2014, 2:16 p.m. UTC, <b>Martin Gräßlin</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;">my understand is that silent/unintended was dead code for these cases as it only iterated over the startups and that if it's in startups it's not in silent or unintended. I'll re-check that.</pre>
</blockquote>
<p>On April 23rd, 2014, 6:02 p.m. UTC, <b>Martin Gräßlin</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;">yep, unintended and ignored do not matter in that case as it's either in startups or in silent_startups or in unintended_startups:
if (update_P) { // change: without any new: first
//qDebug() << "adding uninited";
uninited_startups.insert(id_P, data_P);
} else if (data_P.silent() != Data::Yes || flags & AnnounceSilenceChanges) {
//qDebug() << "adding";
startups.insert(id_P, data_P);
emit q->gotNewStartup(id_P, data_P);
} else { // new silenced, and silent shouldn't be announced
//qDebug() << "adding silent";
silent_startups.insert(id_P, data_P);
}</pre>
</blockquote>
<p>On April 23rd, 2014, 6:04 p.m. UTC, <b>Martin Gräßlin</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;">But yes, it might be a good idea to either rename the new method or add the map as a reference. Though I think rename is better.</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;">I actually meant, whether it's in actual use at all (yes, is) or could fully be replaced by a variant taking an iterator and a map (no, can't) - there's no "ignored" in my copy ;-)
I'd then suggest to rename it to removeAllStartupInfoInternal() and fix it (to operate on iterators) in another patch.</pre>
<br />
<p>- Thomas</p>
<br />
<p>On April 23rd, 2014, 9:35 a.m. UTC, Martin Gräßlin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://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 KDE Frameworks, Àlex Fiestas and Bhushan Shah.</div>
<div>By Martin Gräßlin.</div>
<p style="color: grey;"><i>Updated April 23, 2014, 9:35 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=332681">332681</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kwindowsystem
</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;">Fix crashers in KStartupInfo on remove while iterating
This is similar to the change ... just for more cases. If the API was
used with ::checkStartup it could happen that an item got removed from
the startups while iterating the list of startups. Thus the data
corrupted resulting in a crash when getting a similar crash.
In this case the code now uses erase instead of remove to have a valid
iterator.
BUG: 332681</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;">See new unit tests which crash without the change. For people wanting to run the test: be warned it has the power to crash plasma-shell and kwin.</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>autotests/kstartupinfo_unittest.cpp <span style="color: grey">(29fa320bc2c82e7e04a7322111bcdba44b7078c6)</span></li>
<li>src/kstartupinfo.cpp <span style="color: grey">(6a95ce2d2eb79abbfbd072fa922f458da30d37eb)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/117701/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>