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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On März 21st, 2016, 7:50 vorm. UTC, <b>Andreas Cord-Landwehr</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/127441/diff/1/?file=453667#file453667line92" style="color: black; font-weight: bold; text-decoration: underline;">src/parleydocument.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">92</font></th>
    <td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_doc</span><span class="o">-></span><span class="n">deleteLater</span><span class="p">();</span></pre></td>
    <th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></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;">Don't we get a resource leak now?</p></pre>
 </blockquote>



 <p>On März 22nd, 2016, 6:55 vorm. UTC, <b>Hartmut Riesenbeck</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The resorces were already realeased in the close() method one line before. There the m_doc pointer is also set to zero. Which for my understanding caused the segmentation fault by calling m_doc->deleteLater() with m_doc=0.
The m_backupTimer doesn't need to be deleted here, since it is created (if needed) as a child of the recent ParleyDocument object.</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;">Thanks, missed that line.</p></pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On März 21st, 2016, 7:50 vorm. UTC, <b>Andreas Cord-Landwehr</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/127441/diff/1/?file=453668#file453668line132" style="color: black; font-weight: bold; text-decoration: underline;">src/parleymainwindow.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">132</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">connect</span><span class="p">(</span><span class="n">m_document</span><span class="o">-></span><span class="n">document</span><span class="p">(),</span> <span class="o">&</span><span class="n">KEduVocDocument</span><span class="o">::</span><span class="n">docModified</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">132</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">connect</span><span class="p">(</span><span class="n">doc</span><span class="p">,</span> <span class="n">SIGNAL</span><span class="p">(</span><span class="n">docModified</span><span class="p">(</span><span class="kt">bool</span><span class="p">)),</span> <span class="k">this</span><span class="p">,</span> <span class="n">SLOT</span><span class="p">(</span><span class="n">slotUpdateWindowCaption</span><span class="p">()));</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">133</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="p">,</span> <span class="k">this</span><span class="p">,</span> <span class="o">&</span><span class="n">ParleyMainWindow</span><span class="o">::</span><span class="n">slotUpdateWindowCaption</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">133</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">connect</span><span class="p">(</span><span class="n">doc</span><span class="p">,</span> <span class="n">SIGNAL</span><span class="p">(</span><span class="n">destroyed</span><span class="p">()),</span> <span class="k">this</span><span class="p">,</span> <span class="n">SLOT</span><span class="p">(</span><span class="n">slotUpdateWindowCaption</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 do not see why is solves the problem. If possible, we always prefer the function pointer ways, since it is faster and ensures that the call is correct at compile time. (Neglecting corner cases, the only reason why one sometimes still uses the old mechanism is when one creates QML bindings.)</p></pre>
 </blockquote>



 <p>On März 22nd, 2016, 6:55 vorm. UTC, <b>Hartmut Riesenbeck</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You'are right, the SIGNAL/SLOT macros aren't the cause of the problem. Since I just started with qt5, I didn't know this way to connect signals. My intention here is to use the provided slot argument instead of the document() method. In the course of this change, I corrected the rest of the line in the way I thought it was better (with my outdated qt4 knowledge). Now after reading the qt5 dos, I agree that the function pointer way is better to use. I will upload a corrected diff this evening.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">By the the way. In line 134 - is it better to use:</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%">    <span style="color: #008000; font-weight: bold">connect</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">doc</span><span style="color: #666666">,</span> <span style="color: #666666">&</span><span style="color: #008000; font-weight: bold">QObject</span><span style="color: #666666">:</span><span style="color: #AA22FF">:destroyed</span><span style="color: #666666">,</span> <span style="color: #008000; font-weight: bold">this</span><span style="color: #666666">,</span> <span style="color: #666666">&</span><span style="color: #008000; font-weight: bold">ParleyMainWindow</span><span style="color: #666666">:</span><span style="color: #AA22FF">:slotUpdateWindowCaption</span><span style="color: #666666">);</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">or
        connect(doc, &KEduVocDocument::destroyed, this, &ParleyMainWindow::slotUpdateWindowCaption);  ?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Both versions compiles and runs without error. The second one may better documents that desroying of of the EduVocDocument ist meant.</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;">Yes, I would also go this the second way because it documents the meaning better. Performance-wise that shouldn't make any difference.</p></pre>
<br />




<p>- Andreas</p>


<br />
<p>On März 20th, 2016, 7:49 nachm. UTC, Hartmut Riesenbeck 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 Edu.</div>
<div>By Hartmut Riesenbeck.</div>


<p style="color: grey;"><i>Updated März 20, 2016, 7:49 nachm.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
parley
</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;">When the app is quited app.exec() doesn't return. The process stays in
sleeping state. Removed app.setQuitOnLastWindowClosed(false) because
the quit() or exec() method of the application were not invoked
somewhere else in the application.

After this the app ends in the correct way. But after quit is invoked,
there are sporadic segmentation faults and the following message was
shown on stderr:
    QCoreApplication::postEvent: Unexpected null receiver
This was fixed by removing zero pointer access in destuctor of
ParleyDocument and adding SIGNAL SLOT macros into connect statement in
ParleyMainWidow.</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/main.cpp <span style="color: grey">(2e87baa93f81349a187d620be2468f8a1bb4aca1)</span></li>

 <li>src/parleydocument.cpp <span style="color: grey">(cf4c81c3f8f35a99389d61a75d934cff3170b960)</span></li>

 <li>src/parleymainwindow.cpp <span style="color: grey">(d6f86debd32c1e77bbcca86a160906674960dce9)</span></li>

</ul>

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






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







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