<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/100681/">http://git.reviewboard.kde.org/r/100681/</a>
     </td>
    </tr>
   </table>
   <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="http://git.reviewboard.kde.org/r/100681/diff/2/?file=9500#file9500line810" style="color: black; font-weight: bold; text-decoration: underline;">drkonqi/reportassistantpages_bugzilla.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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; ">void UnhandledErrorDialog::saveErrorMessage()</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">810</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">KUrl</span> <span class="n">fileUrl</span> <span class="o">=</span> <span class="n">dlg</span><span class="o">-></span><span class="n">selectedUrl</span><span class="p">();</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You have to check if the pointer is still valid there.

The reason for using QPointer or QWeakPointer in the first place is that the dialog could be destroyed by e.g. a dbus command IIRC --> there was a blog entry on how to crash nearly every KDE app which commented on that.

So it could be that it is not valid once it reaches the KUrl fileUrl = ... line.
The only way to check if it is valid is using QWeakPointer or QPointer and do KUrl fileUrl (dlg ? dlg->selectedUrl() : KUrl());

Yes I suppose in the worst case it could be deleted inbetween but that should not happen that often. ;)</pre>
</div>
<br />



<p>- Matthias</p>


<br />
<p>On February 19th, 2011, 12:33 p.m., Darío Andrés Rodríguez wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.orgrb/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 KDE Runtime and George Kiagiadakis.</div>
<div>By Darío Andrés Rodríguez.</div>


<p style="color: grey;"><i>Updated Feb. 19, 2011, 12:33 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;">Initial patch

I created a dialog that will show the RAW Bugzilla HTML output when the response can't be parsed by DrKonqi. The user is encouraged to perform the action again later or save the HTML data to submit a DrKonqi bug.

This function is available for the login and the submit (new report or attach to an existant one) processes.
BugzillaLib error message signals were enhanced to hold the raw html (if it makes sense to show it)

The text on the dialog could be changed.

Additional fix: disconnect signals prior to creating a new report or attaching to an existing one; avoiding duplicates dialog. (may be this should go as another patch)</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;">Tested by faking some errors during the login and submit (new report) processes.
The code should be reviewed as I stop coding for KDE several months ago.</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=266542">266542</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>drkonqi/CMakeLists.txt <span style="color: grey">(87c3d24)</span></li>

 <li>drkonqi/bugzillalib.h <span style="color: grey">(cb7da10)</span></li>

 <li>drkonqi/bugzillalib.cpp <span style="color: grey">(348fb72)</span></li>

 <li>drkonqi/reportassistantdialog.cpp <span style="color: grey">(607dd63)</span></li>

 <li>drkonqi/reportassistantpages_bugzilla.h <span style="color: grey">(8681f22)</span></li>

 <li>drkonqi/reportassistantpages_bugzilla.cpp <span style="color: grey">(e896c52)</span></li>

 <li>drkonqi/reportinterface.h <span style="color: grey">(a1fc78a)</span></li>

 <li>drkonqi/reportinterface.cpp <span style="color: grey">(a484d11)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/100681/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/100681/s/77/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2011/02/19/drkonqi_unhandlederror_400x100.jpeg" style="border: 1px black solid;" alt="Unhandled Error Dialog" /></a>

</div>


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








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