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




<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 KMymoney.</div>
<div>By Christian David.</div>


<p style="color: grey;"><i>Updated March 14, 2016, 9:32 p.m.</i></p>







<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=356399">356399</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kmymoney
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Fixed potential memory leak during saving</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">A pointer was not deleted before throwing exceptions in
KMyMoneyView::saveFile. Also renamed the pointer.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Changed way of saving files which should fix some bugs</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The save operation seems to fail every time - it never changed the
orginal file and never reported any issues. I did not find the exact
reason for this bug but I am quite sure it was caused by an incorret
usage of QSaveFile (under some circumstances close() instead of commit()
was called).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now KMyMoney creates its own temporary file to write to (if needed).
This also works using KGpgFile, which should fix Bug 356399.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The remove() and rename() operations are not atomic which is not so
good as this could result in dataloss if the first operation fails.
However, this is the best OS independet process I could find.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Errors during writing of compressed files may not be detected. I think
this issue should be fixed upstream.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">BUG: 356399
FIXED-IN: 5.0
REVIEW: 127108</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Fixed bug while saving GPG encrypted files</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">A call to QSaveFile::commit() was missing. So QSaveFile always assumed
an error and discarded the changes.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Used this fix for minor clean-ups.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing (updated)</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I saved a file several times using the compressed, uncompressed and anonymous format. I could not test the GPG part because none of my keys is currently shown by the save dialog.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">New: I tested it with GPG encrypted files.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Brand new: Tried to saved in locations I have no write premissions for, to non-existing folders, and write protected files. I tried hard to reproduce bug 256750 - everything seems to be alright.</p></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>CMakeLists.txt <span style="color: grey">(a82d70eed87c5f8a8052b969c0a8a17d82ef8b1d)</span></li>

 <li>kmymoney/views/kmymoneyview.h <span style="color: grey">(c4a769c2bf88083ea56283d683d7f0f7f0466875)</span></li>

 <li>kmymoney/views/kmymoneyview.cpp <span style="color: grey">(284bd6a2657982c25790b2428730f279fc86504c)</span></li>

 <li>libkgpgfile/kgpgfile.cpp <span style="color: grey">(b1870be92edb833ed30f369e3e0ca0f320fe147b)</span></li>

</ul>

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






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



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