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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 16th, 2016, 4:52 p.m. UTC, <b>David Faure</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/128191/diff/2/?file=468842#file468842line80" style="color: black; font-weight: bold; text-decoration: underline;">src/kcapacitybar.h</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">72</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">explicit</span> <span class="nf">KCapacityBar</span><span class="p">(</span><span class="n">DrawTextMode</span> <span class="n">drawTextMode</span> <span class="o">=</span> <span class="n">DrawTextOutline</span><span class="p">,</span> <span class="n">QWidget</span> <span class="o">*</span><span class="n">parent</span> <span class="o">=</span> <span class="mi">0</span><span class="p">);</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">80</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">explicit</span> <span class="nf">KCapacityBar</span><span class="p">(</span><span class="n">DrawTextMode</span> <span class="n">drawTextMode</span> <span class="o">=</span> <span class="n">DrawTextOutline</span><span class="p">,</span> <span class="n">QWidget</span> <span class="o">*</span><span class="n">parent</span> <span class="o">=</span> <span class="mi">0</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;">I didn't see the default value here. This makes new KCapacityBar() ambiguous indeed.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The default value for drawTextMode should be removed. This is BC and SC since you added the other ctor.</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Fixed in commit 3c0041cd49</p></pre>
<br />




<p>- Elvis</p>


<br />
<p>On June 16th, 2016, 1:10 p.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 16, 2016, 1:10 p.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>