<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/102059/">http://git.reviewboard.kde.org/r/102059/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 23rd, 2011, 5:26 p.m., <b>Ilia Kats</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/102059/diff/1/?file=29549#file29549line405" style="color: black; font-weight: bold; text-decoration: underline;">settings/config/manageconnectionwidget.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="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void ManageConnectionWidget::addClicked()</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">405</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">QString</span> <span class="n">impFile</span> <span class="o">=</span> <span class="n">KFileDialog</span><span class="o">::</span><span class="n">getOpenFileName</span><span class="p">(</span><span class="n">KUser</span><span class="p">().</span><span class="n">homeDir</span><span class="p">(),</span><span class="s">&quot;*.pcf&quot;</span><span class="p">,</span><span class="k">this</span><span class="p">,</span><span class="n">i18nc</span><span class="p">(</span><span class="s">&quot;File chooser dialog title for importing VPN&quot;</span><span class="p">,</span><span class="s">&quot;Import VPN connection settings&quot;</span><span class="p">));</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">405</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">QString</span> <span class="n">impFile</span> <span class="o">=</span> <span class="n">KFileDialog</span><span class="o">::</span><span class="n">getOpenFileName</span><span class="p">(</span><span class="n">KUser</span><span class="p">().</span><span class="n">homeDir</span><span class="p">(),</span><span class="s">&quot;*.pc<span class="hl">f *.ovpn *.con</span>f&quot;</span><span class="p">,</span><span class="k">this</span><span class="p">,</span><span class="n">i18nc</span><span class="p">(</span><span class="s">&quot;File chooser dialog title for importing VPN&quot;</span><span class="p">,</span><span class="s">&quot;Import VPN connection settings&quot;</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;">At this point, it would probably be best to let the plugins specify the file extensions. The method could return a QStringList, which ManageConnectionWidget would collect from all installed plugins, then join them to a QString and call KFileDialog.</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;">Possibly another method into VpnUiPlugin?</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 23rd, 2011, 5:26 p.m., <b>Ilia Kats</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/102059/diff/1/?file=29553#file29553line204" style="color: black; font-weight: bold; text-decoration: underline;">vpnplugins/openvpn/openvpn.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="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">SettingWidget * OpenVpnUiPlugin::askUser(Knm::Connection * connection, QWidget * parent)</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">202</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                    <span class="n">KMessageBox</span><span class="o">::</span><span class="n">warningContinueCancel</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">i18n</span><span class="p">(</span><span class="s">&quot;Unknown option: %1&quot;</span><span class="p">,</span> <span class="n">line</span><span class="p">),</span> <span class="n">i18n</span><span class="p">(</span><span class="s">&quot;Warning&quot;</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;">You&#39;re using these a lot here, without actually checking the return value, so regardless of what the user clicked, the import will continue. I think you&#39;d need to introduce a new error type, like UserCanceled, and return an empty QVariantList after setting mError to this if Cancel was clicked (also, ManageConnectionWidget should recognize this error type and not display any additional pop-ups).</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;">These are actually non-fatal messages, could be safely ignored. Is there a better way than warningContinueCancel?</pre>
<br />




<p>- Rajeesh</p>


<br />
<p>On July 23rd, 2011, 4:41 p.m., Rajeesh K Nambiar 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 Rajeesh K Nambiar.</div>


<p style="color: grey;"><i>Updated July 23, 2011, 4:41 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;">Caveat emptor: There is one unresolved issue with isEncrypted() function - we need to check of key file is PKCS12 format or not. nm-applet achieves this through a call to nm_setting_802_1x_set_private_key(). I&#39;ve googled a lot, and looks like there is no way to check PKCS12 file format in either Qt or KDE.
If we are to add ad-hoc support via SEC_PKCS12DecoderStart and related functions from nss (which is what NetworkManager does), it wil introduce a new dependency on nss-devel.</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;">Only lightly tested, seems to import/export OK for sample configuration file. I don&#39;t have an OpenVPN connection, so it would be great if someone could test.</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=194099">194099</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/ui/vpnuiplugin.h <span style="color: grey">(932d86f)</span></li>

 <li>settings/config/manageconnectionwidget.cpp <span style="color: grey">(780d50f)</span></li>

 <li>vpnplugins/novellvpn/novellvpn.h <span style="color: grey">(a95926b)</span></li>

 <li>vpnplugins/novellvpn/novellvpn.cpp <span style="color: grey">(61d5519)</span></li>

 <li>vpnplugins/openvpn/openvpn.h <span style="color: grey">(4607cd5)</span></li>

 <li>vpnplugins/openvpn/openvpn.cpp <span style="color: grey">(6f126b8)</span></li>

 <li>vpnplugins/pptp/pptp.h <span style="color: grey">(e513d3c)</span></li>

 <li>vpnplugins/pptp/pptp.cpp <span style="color: grey">(e4efbd7)</span></li>

 <li>vpnplugins/strongswan/strongswan.h <span style="color: grey">(d648217)</span></li>

 <li>vpnplugins/strongswan/strongswan.cpp <span style="color: grey">(9d4a8be)</span></li>

 <li>vpnplugins/vpnc/vpnc.h <span style="color: grey">(0b3f6db)</span></li>

 <li>vpnplugins/vpnc/vpnc.cpp <span style="color: grey">(ea24cf1)</span></li>

</ul>

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




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








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