<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/101788/">http://git.reviewboard.kde.org/r/101788/</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 27th, 2011, 12:37 p.m., <b>Lamarque Vieira Souza</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="http://git.reviewboard.kde.org/r/101788/diff/1/?file=25396#file25396line50" style="color: black; font-weight: bold; text-decoration: underline;">vpnplugins/openconnect/openconnectwidget.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">OpenconnectSettingWidget::~OpenconnectSettingWidget()</pre></td>

  </tr>
 </tbody>




 
 



 <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">50</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">delete</span> <span class="n">d_ptr</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;">Do not do this. This class inherit from SettingWidget, which has a virtual destructor, which already deletes d_ptr. You are doing a double delete here, which will corrupt system memory. Just remove this line.</pre>
 </blockquote>



 <p>On June 27th, 2011, 6:19 p.m., <b>Ilia Kats</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">As far as I know, this would only apply if OpenconnectAuthWidgetPrivate would inherit from SettingWidgetPrivate, which it does not. All the other VPN plugins are also deleting their d-pointers.</pre>
 </blockquote>





 <p>On June 27th, 2011, 6:25 p.m., <b>Ilia Kats</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">OpenconnectSettingWidgetPrivate, sorry. Applies for the auth widget too, though.</pre>
 </blockquote>





 <p>On June 27th, 2011, 6:53 p.m., <b>Lamarque Vieira Souza</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So they are all double deleting. SettingWidget&#39;s destructor is virtual, if it was not then there would be no problem. Besides, SettingWidgetPrivate does not even have a destructor.</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;">Ok, I checked this and there is no double deleting because the classes that inherit from SettingWidget also declare d_ptr by theirselves. The d_ptr in them is not the same one in SettingWidget, so we really need to delete them all.</pre>
<br />




<p>- Lamarque Vieira</p>


<br />
<p>On June 27th, 2011, 10:07 p.m., Ilia Kats wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Network Management.</div>
<div>By Ilia Kats.</div>


<p style="color: grey;"><i>Updated June 27, 2011, 10:07 p.m.</i></p>




<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;">Add an OpenConnect VPN plug-in to KDE NM. First time using threads, so I don&#39;t know if that&#39;s how it&#39;s supposed to be done, but it seems to be working.
Also, I can&#39;t figure out  how to make the loginForm QGroupBox have a minimum height, but get bigger when widgets get added. If the minimum height is 0, then both the box and the dialog get resized, however this causes visual &quot;interference&quot; as the serverLogBox jumps up and down as the upper loginForm box gets resized. Setting the minimum height of the loginForm box to 100 causes it to stay at 100 and squeeze the added widgets to fit the size, instead of getting bigger. Any ideas?

This requires OpenConnect &gt;= 3.03 to build. 3.03 is not yet released, but the important thing is commit 423eee0b51a204562d6f2ec67893133ebcf200d6 from OpenConnect git (http://git.infradead.org/users/dwmw2/openconnect.git/ )</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;">Yes, see the bugzilla ticket.</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=226028">226028</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>libs/internals/settings/vpnsecrets.cpp <span style="color: grey">(0d9e3f9)</span></li>

 <li>libs/ui/connectionsecretsjob.cpp <span style="color: grey">(d791bb3)</span></li>

 <li>libs/ui/vpnuiplugin.h <span style="color: grey">(444ab2a)</span></li>

 <li>libs/ui/vpnuiplugin.cpp <span style="color: grey">(d058a52)</span></li>

 <li>vpnplugins/CMakeLists.txt <span style="color: grey">(4706a61)</span></li>

 <li>vpnplugins/openconnect/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/FindOpenConnect.cmake <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/README <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/networkmanagement_openconnectui.desktop <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/nm-openconnect-service.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectauth.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectauth.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectauth.ui <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectauthworkerthread.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectauthworkerthread.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectprop.ui <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectui.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectui.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectwidget.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>vpnplugins/openconnect/openconnectwidget.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/101788/diff/" style="margin-left: 3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>

<div>

 <a href="http://git.reviewboard.kde.org/r/101788/s/191/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2011/06/27/openconnectauthdialog_400x100.png" style="border: 1px black solid;" alt="" /></a>

</div>


  </td>
 </tr>
</table>








  </div>
 </body>
</html>