<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/127655/">https://git.reviewboard.kde.org/r/127655/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On May 4th, 2016, 11:20 a.m. UTC, <b>Friedrich W. H. Kossebau</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/127655/diff/2/?file=462409#file462409line925" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/kaboutdata.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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">925</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">warnIfOutOfSync</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">aboutDataString</span><span class="p">,</span> <span class="k">const</span> <span class="n">QString</span> <span class="o">&</span><span class="n">aboutDataValue</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Forgot to note the static I am used to write here. But given your comment I am now unsure about my C++ foo: checked the lib binary with nm, and no matter whether I used static, namespace {} (& inline just for the sake) or a combination of them, the method was always listed as a private symbol (nm | grep):
000000000002486f t <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">ZL15warnIfOutOfSyncPKcRK7QStringS0_S3</em>
0000000000081900 r _ZZL15warnIfOutOfSyncPKcRK7QStringS0_S3_E19<strong style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">PRETTY_FUNCTION</strong></p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Which also matches what I would have expected before your comment, so need your handholding what and how this can be improved here exactly :)</p></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 think private symbols are just an anomaly of the way the toolchain handles compiling/linking in face of possibility that debugging/LTO/etc. might happen. The important thing is that they are not listed as public symbols, they will compile with more optimizations/inlining (since they can't be interposed using LD_PRELOAD), etc. So either static or anon. namespace is fine. There's some reason to prefer anon. namespace that I forget offhand but either is fine here.</pre>
<br />
<p>- Michael</p>
<br />
<p>On May 4th, 2016, 2:47 p.m. UTC, Friedrich W. H. Kossebau 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, Alex Richardson and Michael Pyne.</div>
<div>By Friedrich W. H. Kossebau.</div>
<p style="color: grey;"><i>Updated May 4, 2016, 2:47 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kcoreaddons
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">There is code in e.g. KXMLGUI which relies on KAboutData::applicationData(), without requiring the user to use KAboutData::setApplicationData(). So better be complete when initializing the data from the Q*Application metadata.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Also
- warn if there is no Q*App instance yet to set properties in KAboutData::setApplicationData
- check and warn if KAboutData::applicationData is out-of-sync with qapp data
- remove bogus check for empty display name, as the method defaults to componentname
- unit tests KAboutDataTest::testSetOfQApplicationData/testPickupOfQApplicationData</p></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;">Added autotests pass.</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>autotests/CMakeLists.txt <span style="color: grey">(a7a6752)</span></li>
<li>autotests/kaboutdataapplicationdatatest.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/lib/kaboutdata.h <span style="color: grey">(97c0f2b)</span></li>
<li>src/lib/kaboutdata.cpp <span style="color: grey">(ceb0c06)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/127655/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>