<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/129759/">https://git.reviewboard.kde.org/r/129759/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been discarded.</h1>
</td>
</tr>
</table>
<br />
<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 Extra Cmake Modules.</div>
<div>By Shaheed Haque.</div>
<p style="color: grey;"><i>Updated Jan. 18, 2017, 12:48 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
extra-cmake-modules
</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;">This involves reverting a change (see below). Without this reversion, we get for example:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">sip: .../kfontutils.sip:14: Compulsory argument given after optional argument</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Where the .h file says:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">============
qreal KGUIADDONS_EXPORT adaptFontSize(QPainter &painter,
const QString &text,
qreal width,
qreal height,
qreal maxFontSize = 28.0,
qreal minFontSize = 1.0,
AdaptFontSizeOptions flags = NoFlags);
============</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">while the SIP file says (note the flags parameter is missing its initialiser):</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><span style="color: #008000; font-weight: bold">qreal</span> <span style="color: #008000; font-weight: bold">adaptFontSize</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">QPainter</span> <span style="color: #666666">&</span> <span style="color: #008000; font-weight: bold">painter</span><span style="color: #666666">,</span> <span style="color: #666666">...,</span> <span style="color: #008000; font-weight: bold">double</span> <span style="color: #008000; font-weight: bold">minFontSize</span> <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">1</span><span style="color: #0000FF; font-weight: bold">.0</span><span style="color: #666666">,</span> <span style="color: #008000; font-weight: bold">QFlags</span><span style="color: #666666"><</span><span style="color: #008000; font-weight: bold">KFontUtils</span><span style="color: #666666">:</span><span style="color: #AA22FF">:AdaptFontSizeOption</span><span style="color: #666666">></span> <span style="color: #008000; font-weight: bold">flags</span><span style="color: #666666">);</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With this change, the SIP file says:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><span style="color: #008000; font-weight: bold">qreal</span> <span style="color: #008000; font-weight: bold">adaptFontSize</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">QPainter</span> <span style="color: #666666">&</span> <span style="color: #008000; font-weight: bold">painter</span><span style="color: #666666">,</span> <span style="color: #666666">...,</span> <span style="color: #008000; font-weight: bold">double</span> <span style="color: #008000; font-weight: bold">minFontSize</span> <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">1</span><span style="color: #0000FF; font-weight: bold">.0</span><span style="color: #666666">,</span> <span style="color: #008000; font-weight: bold">QFlags</span><span style="color: #666666"><</span><span style="color: #008000; font-weight: bold">KFontUtils</span><span style="color: #666666">:</span><span style="color: #AA22FF">:AdaptFontSizeOption</span><span style="color: #666666">></span> <span style="color: #008000; font-weight: bold">flags</span> <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">NoFlags</span><span style="color: #666666">);</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">There are many instances of this issue, but in only a handful of cases such
as this example from kguiaddons, the resulting SIP code does not compile. That
is the subject of a pending fix local to kguiaddons.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The details of the bug are that the test on "member.kind.is_expression()" does
not work reliably for unknown reasons. (In the case of KFontUtils::adaptFontSize's
flags argument, the member.kind is TYPE_REF). Also, the logic around the isQFlags
variable seems to be unclear and possibly broken.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The commit being reverted is in a github fork, and its original details are:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>Title: "Try to make a better implementation of determining init value"
Commit ID: bcf1d6078f2c544d3908490ae538d2b97ca997d3
</pre></div>
</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;">Run across all of /usr/include/KF5, and reviewed the changed output.</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>find-modules/sip_generator.py <span style="color: grey">(10be147711540437d38153fa8fe859bd34d7aa6c)</span></li>
<li>tests/GenerateSipBindings/cpplib.h <span style="color: grey">(0d63c30ed52b5d817c233e358b1ebce7a70c8218)</span></li>
<li>tests/GenerateSipBindings/cpplib.cpp <span style="color: grey">(c5b7a5fbe6310b6b3742c3d35d2d04c67d77066f)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/129759/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>