[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request 107650: Don't call exec() on KIO::MimetypeJob
From:       "Commit Hook" <null () kde ! org>
Date:       2013-01-15 18:34:58
Message-ID: 20130115183458.31632.36348 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107650/#review25602
-----------------------------------------------------------


This review has been submitted with commit c5cdeb34acc5220311d86b918de27db7290bf1f4 \
by Andrea Scarpino to branch master.

- Commit Hook


On Jan. 15, 2013, 2:32 p.m., Andrea Scarpino wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107650/
> -----------------------------------------------------------
> 
> (Updated Jan. 15, 2013, 2:32 p.m.)
> 
> 
> Review request for Plasma, Aaron J. Seigo and Giorgos Tsiapaliokas.
> 
> 
> Description
> -------
> 
> The doc say:
> 
> bool KJob::exec	()
> 
> "Executes the job synchronously.
> This will start a nested QEventLoop internally. Nested event loop can be dangerous \
> and can have unintended side effects, you should avoid calling exec() whenever you \
> can and use the asyncronous interface of KJob instead. Should you indeed call this \
> method, you need to make sure that all callers are reentrant, so that events \
> delivered by the inner event loop don't cause non-reentrant functions to be called, \
> which usually wreaks havoc. Note that the event loop started by this method does \
> not process user input events, which means your user interface will effectivly be \
> blocked. Other events like paint or network events are still being processed. The \
> advantage of not processing user input events is that the chance of accidental \
> reentrancy is greatly reduced. Still you should avoid calling this function." 
> So, I replaced it by using SIGNAL-SLOT.
> 
> 
> Diffs
> -----
> 
> plasmate/editors/editpage.h 5cb3ea6 
> plasmate/editors/editpage.cpp 7e82ff2 
> 
> Diff: http://git.reviewboard.kde.org/r/107650/diff/
> 
> 
> Testing
> -------
> 
> Plasmate has the same behavior with and without this patch, but this is more robust \
> IMHO. 
> 
> Thanks,
> 
> Andrea Scarpino
> 
> 


[Attachment #5 (text/html)]

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





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been \
submitted with commit c5cdeb34acc5220311d86b918de27db7290bf1f4 by Andrea Scarpino to \
branch master.</pre>  <br />









<p>- Commit</p>


<br />
<p>On January 15th, 2013, 2:32 p.m. UTC, Andrea Scarpino wrote:</p>






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

<div>Review request for Plasma, Aaron J. Seigo and Giorgos Tsiapaliokas.</div>
<div>By Andrea Scarpino.</div>


<p style="color: grey;"><i>Updated Jan. 15, 2013, 2:32 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;">The doc say:

bool KJob::exec	()

&quot;Executes the job synchronously.
This will start a nested QEventLoop internally. Nested event loop can be dangerous \
and can have unintended side effects, you should avoid calling exec() whenever you \
can and use the asyncronous interface of KJob instead. Should you indeed call this \
method, you need to make sure that all callers are reentrant, so that events \
delivered by the inner event loop don&#39;t cause non-reentrant functions to be \
called, which usually wreaks havoc. Note that the event loop started by this method \
does not process user input events, which means your user interface will effectivly \
be blocked. Other events like paint or network events are still being processed. The \
advantage of not processing user input events is that the chance of accidental \
reentrancy is greatly reduced. Still you should avoid calling this function.&quot;

So, I replaced it by using SIGNAL-SLOT.</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;">Plasmate has the same behavior with and without this patch, but this is \
more robust IMHO.</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>plasmate/editors/editpage.h <span style="color: grey">(5cb3ea6)</span></li>

 <li>plasmate/editors/editpage.cpp <span style="color: grey">(7e82ff2)</span></li>

</ul>

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







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








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



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic