<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/128191/">https://git.reviewboard.kde.org/r/128191/</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;">Does it also need updates to KF5::DesignerPlugin?</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/128191/diff/1/?file=468829#file468829line69" style="color: black; font-weight: bold; text-decoration: underline;">src/kcapacitybar.h</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">69</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> */</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;">@since 5.24</pre>
</div>
</div>
<br />
<p>- Christoph Feck</p>
<br />
<p>On June 15th, 2016, 10:19 a.m. UTC, Elvis Angelaccio 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 and Christoph Feck.</div>
<div>By Elvis Angelaccio.</div>
<p style="color: grey;"><i>Updated June 15, 2016, 10:19 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kwidgetsaddons
</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;">Currently KCapacityBar doesn't seem to be usable from Qt Designer (unless I'm doing something wrong).
The class has only an explicit multi-argument constructor, but Qt Designer generates something like:</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%">capacityBar <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> KCapacityBar(widget_3);
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">which fails to compile because there is no explicit conversion from <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">QWidget*</code> to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KCapacityBar::DrawTextMode</code>:</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%">error<span style="color: #666666">:</span> no matching constructor <span style="color: #008000; font-weight: bold">for</span> initialization of <span style="color: #BA2121">'KCapacityBar'</span>
capacityBar <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> <span style="color: #B00040">KCapacityBar</span><span style="color: #666666">(</span>widget_3<span style="color: #666666">);</span>
<span style="color: #666666">^</span> <span style="color: #666666">~~~~~~~~</span>
<span style="color: #BB6688">/usr/include/KF5/KWidgetsAddons/</span>kcapacitybar<span style="color: #666666">.</span><span style="color: #7D9029">h</span><span style="color: #666666">:44:29:</span> note<span style="color: #666666">:</span> candidate constructor <span style="color: #666666">(</span>the implicit copy constructor<span style="color: #666666">)</span> not viable<span style="color: #666666">:</span> no known conversion from
<span style="color: #BA2121">'QWidget *'</span> to <span style="color: #BA2121">'const KCapacityBar'</span> <span style="color: #008000; font-weight: bold">for</span> <span style="color: #666666">1</span>st argument
<span style="color: #008000; font-weight: bold">class</span> KWIDGETSADDONS_EXPORT KCapacityBar
<span style="color: #666666">^</span>
<span style="color: #BB6688">/usr/include/KF5/KWidgetsAddons/</span>kcapacitybar<span style="color: #666666">.</span><span style="color: #7D9029">h</span><span style="color: #666666">:72:14:</span> note<span style="color: #666666">:</span> candidate constructor not viable<span style="color: #666666">:</span> no known conversion from <span style="color: #BA2121">'QWidget *'</span> to
<span style="color: #BA2121">'KCapacityBar::DrawTextMode'</span> <span style="color: #008000; font-weight: bold">for</span> <span style="color: #666666">1</span>st argument
explicit KCapacityBar<span style="color: #666666">(</span>DrawTextMode drawTextMode <span style="color: #666666">=</span> DrawTextOutline<span style="color: #666666">,</span> QWidget <span style="color: #666666">*</span>parent <span style="color: #666666">=</span> <span style="color: #666666">0);</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch simply adds another constructor with a single argument (the pointer to the parent).</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;">KCapacityBar can now be used in a Qt Designer custom widget.</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/kcapacitybar.h <span style="color: grey">(1a1f2e60f415904d6cf603a4b4e0cae1c543169a)</span></li>
<li>src/kcapacitybar.cpp <span style="color: grey">(ecd2c13feb88f5c9e92086639bff48c6d0527779)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/128191/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>