<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 />



<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 marked as submitted.</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 KDE Frameworks and Christoph Feck.</div>
<div>By Elvis Angelaccio.</div>


<p style="color: grey;"><i>Updated June 25, 2016, 9:10 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>

 <li>src/kmultitabbar.h <span style="color: grey">(068f0980827e6806d7cb2a17e8b261f7e1620204)</span></li>

 <li>src/kmultitabbar.cpp <span style="color: grey">(bc58b81cbe4d98043762a36a43b4777ada30734f)</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>