<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/127215/">https://git.reviewboard.kde.org/r/127215/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">About the unittest failure, I'm available by email to debug that, tests shouldn't fail.
(first thing to check will be: did a ~/.qttest/share/applications/faketextapplication.desktop get created?)</p></pre>
<br />
<div>
<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/127215/diff/1/?file=445933#file445933line65" style="color: black; font-weight: bold; text-decoration: underline;">src/sycoca/kbuildmimetypefactory.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">65</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="n"><span class="hl">dirName</span></span><span class="hl"> </span><span class="o"><span class="hl">==</span></span><span class="hl"> </span><span class="s">"packages"</span><span class="p">)</span> <span class="p">{</span> <span class="c1">// special subdir</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">59</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="n"><span class="hl">QLatin1String</span></span><span class="p"><span class="hl">(</span></span><span class="s">"packages"</span><span class="p"><span class="hl">)</span></span><span class="hl"> </span><span class="o"><span class="hl">==</span></span><span class="hl"> </span><span class="n"><span class="hl">dirName</span></span><span class="p">)</span> <span class="p">{</span> <span class="c1">// special subdir</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Can you keep the order of the operands? I find
if (var == constant)
more readable than the other way around.
("is this car green?", not "is green the color of this car?"). In any case that's how it is everywhere in KF5 AFAIK.</p></pre>
</div>
</div>
<br />
<div>
<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/127215/diff/1/?file=445934#file445934line85" style="color: black; font-weight: bold; text-decoration: underline;">src/sycoca/kbuildservicefactory.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">85</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">const</span> <span class="n">QStringRef</span> <span class="n">name</span> <span class="o">=</span> <span class="n">file</span><span class="p">.</span><span class="n">midRef</span><span class="p">(</span><span class="n">file</span><span class="p">.</span><span class="n">lastIndexOf</span><span class="p">(</span><span class="sc">'/'</span><span class="p">)</span> <span class="o">+</span> <span class="mi">1</span><span class="p">);</span> <span class="c1">//-1 +1 = 0</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It took me some time to understand the comment -1 +1 = 0, since here there <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">is</em> just a +1. Position after the slash -> +1. No -1 anywhere.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But then I got it - this is about the case where there is no '/', then we get -1 and start from 0. It's obvious to me, while the comment isn't ;)
So I'd say remove the comment, or make it more explicit ("if no slash, -1 + 1 = 0").</p></pre>
</div>
</div>
<br />
<div>
<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/127215/diff/1/?file=445934#file445934line101" style="color: black; font-weight: bold; text-decoration: underline;">src/sycoca/kbuildservicefactory.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">99</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KDesktopFile</span> <span class="n">desktopFile</span><span class="p">(</span><span class="n">QStandardPaths</span><span class="o">::</span><span class="n">GenericDataLocation</span><span class="p">,</span> <span class="s">"kservices5/"</span> <span class="o">+</span> <span class="n">file</span><span class="p">);</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">96</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KDesktopFile</span> <span class="n">desktopFile</span><span class="p">(</span><span class="n">QStandardPaths</span><span class="o">::</span><span class="n">GenericDataLocation</span><span class="p">,</span> <span class="n"><span class="hl">QLatin1String</span></span><span class="p"><span class="hl">(</span></span><span class="s">"kservices5/"</span><span class="p"><span class="hl">)</span></span> <span class="o">+</span> <span class="n">file</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Shouldn't this one be a QStringLiteral?</p></pre>
</div>
</div>
<br />
<div>
<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/127215/diff/1/?file=445934#file445934line216" style="color: black; font-weight: bold; text-decoration: underline;">src/sycoca/kbuildservicefactory.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">214</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="hl"> </span><span class="k"><span class="hl">const</span></span> <span class="n">KSycocaEntryDict</span><span class="o">::</span><span class="n"><span class="hl">I</span>terator</span> <span class="n">endserv</span> <span class="o">=</span> <span class="n">m_entryDict</span><span class="o">-></span><span class="n"><span class="hl">e</span>nd</span><span class="p">();</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">210</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KSycocaEntryDict</span><span class="o">::</span><span class="n"><span class="hl">const_i</span>terator</span> <span class="n">endserv</span> <span class="o">=</span> <span class="n">m_entryDict</span><span class="o">-></span><span class="n"><span class="hl">constE</span>nd</span><span class="p">();</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You could have kept the "const" in front of endserv (same below)</p></pre>
</div>
</div>
<br />
<div>
<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/127215/diff/1/?file=445935#file445935line209" style="color: black; font-weight: bold; text-decoration: underline;">src/sycoca/kbuildsycoca.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">208</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">const</span> <span class="n">QStringList</span> <span class="n">dirs</span> <span class="o">=</span> <span class="n">QStandardPaths</span><span class="o">::</span><span class="n">locateAll</span><span class="p">(</span><span class="n">QStandardPaths</span><span class="o">::</span><span class="n">GenericDataLocation</span><span class="p">,</span> <span class="n">m_resourceSubdir</span><span class="p">,</span> <span class="n">QStandardPaths</span><span class="o">::</span><span class="n">LocateDirectory</span><span class="p">);</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">204</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">Q_FOREACH</span> <span class="p">(</span><span class="k">const</span> <span class="n">QString</span> <span class="o">&</span><span class="n">dir</span><span class="p">,</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">what is the clazy warning that encourages to write such a long line of code, rather than the two lines as it was initially?</p></pre>
</div>
</div>
<br />
<div>
<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/127215/diff/1/?file=445937#file445937line322" style="color: black; font-weight: bold; text-decoration: underline;">src/sycoca/ksycocadict.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">322</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">addDiversity</span><span class="p">(</span><span class="n">KSycocaDictStringList</span><span class="hl"> </span><span class="o"><span class="hl">*</span></span><span class="n">stringlist</span><span class="p">,</span> <span class="kt">int</span> <span class="n">pos</span><span class="p">)</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">316</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">addDiversity</span><span class="p">(</span><span class="n">KSycocaDictStringList</span><span class="o"><span class="hl">&</span></span><span class="hl"> </span><span class="n">stringlist</span><span class="p">,</span> <span class="kt">int</span> <span class="n">pos</span><span class="p">)</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I agree.</p></pre>
</div>
</div>
<br />
<p>- David Faure</p>
<br />
<p>On February 29th, 2016, 12:43 a.m. UTC, Nick Shaforostoff wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks.</div>
<div>By Nick Shaforostoff.</div>
<p style="color: grey;"><i>Updated Feb. 29, 2016, 12:43 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kservice
</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;">Changes are mostly related to containers/iterators, but there are also few QString related optimizations
note that i have made a switch from QLinkedList to just QList because it performs better for T=<void*>
also i have changed QStringList to QSet<QString> in one place to make the code run faster</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">all tests pass, except kmimeassociationstest (fakeApplicationService is NULL), but it fails also without my changes</p></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/sycoca/kbuildmimetypefactory.cpp <span style="color: grey">(340f76a)</span></li>
<li>src/sycoca/kbuildservicefactory.cpp <span style="color: grey">(a74f2e8)</span></li>
<li>src/sycoca/kbuildsycoca.cpp <span style="color: grey">(e99e906)</span></li>
<li>src/sycoca/kmimeassociations.cpp <span style="color: grey">(9423b27)</span></li>
<li>src/sycoca/ksycocadict.cpp <span style="color: grey">(f33d01a)</span></li>
<li>src/sycoca/ksycocafactory.cpp <span style="color: grey">(e410581)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/127215/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>