<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/112364/">http://git.reviewboard.kde.org/r/112364/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 10th, 2013, 7:20 a.m. UTC, <b>Cristian Oneț</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/112364/diff/1/?file=185610#file185610line219" style="color: black; font-weight: bold; text-decoration: underline;">kmymoney/dialogs/investactivities.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 Activity::preloadAssetAccount(void)</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">219</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">kMyMoneyEdit</span><span class="o">*</span> <span class="n">shares</span> <span class="o">=</span> <span class="k">dynamic_cast</span><span class="o"><</span><span class="n">kMyMoneyEdit</span><span class="o">*></span><span class="p">(</span><span class="n">haveWidget</span><span class="p">(</span><span class="s">"shares"</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;">Is there a reason why the show of "shares" and "price" was move out from the for loop?</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;">Within the loop, they were handled as QWidgets and were misbehaving. I needed them to be kMyMoneyEdit, to access its children.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 10th, 2013, 7:20 a.m. UTC, <b>Cristian Oneț</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/112364/diff/1/?file=185610#file185610line318" style="color: black; font-weight: bold; text-decoration: underline;">kmymoney/dialogs/investactivities.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; ">bool Buy::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QList<MyMoneySplit>& feeSplits, QList<MyMoneySplit>& m_feeSplits, QList<MyMoneySplit>& interestSplits, QList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency)</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">318</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="kt">int</span> <span class="n">rowHeight</span> <span class="o">=</span> <span class="mi">0</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;">Same questions as Buy::showWidgets()</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;">Same answer.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 10th, 2013, 7:20 a.m. UTC, <b>Cristian Oneț</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/112364/diff/1/?file=185613#file185613line155" style="color: black; font-weight: bold; text-decoration: underline;">kmymoney/dialogs/transactioneditor.h</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; ">public:</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">155</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KMyMoneyRegister</span><span class="o">::</span><span class="n">QWidgetContainer</span> <span class="n">m_editWidgets</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;">Is making this public a good idea?</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;">I had already reverted it here to protected.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 10th, 2013, 7:20 a.m. UTC, <b>Cristian Oneț</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;">Another nice thing would be to have a separate patch for each individual functionality. Right now we have two things here 1 - ledger resizing and 2 - investment editor fix for widgets that are visible when they should not be. For me it's not that easy to make a review this way.</pre>
</blockquote>
<p>On September 10th, 2013, 9:57 a.m. UTC, <b>Allan Anderson</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;">The two came along together. I can do this for these changes in the investment editor, but most of the trouble was in the new code, even though the methods were identical or near-identical. So, for these, there is no patch fixing something, as there was no code there before.
Anyway, I'll see if I can do some separation.</pre>
</blockquote>
<p>On September 12th, 2013, 10:32 a.m. UTC, <b>Allan Anderson</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;">Incidentally, this problem with the edit widgets disappearing/appearing when wanted/unwanted is present in an unpatched git HEAD, and has been there for a long while. Opening any investment transaction, then resizing the window, will produce it with one or more widgets.
>From some fresh experiments, if a hide() (or show()) does not do the necessary, then often replacing with setCalculatorButtonVisible(false) and
lineedit()->hide() does the trick. Sadly though, that does not work in every case, and it looks like the only sure-fire fix is the one I came up with, setting the widget height to zero instead of hiding.
</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">What I'm working on and proposing is, for now, to concentrate on the column width issues.
It is almost exclusively in the Register class, with revised versions of Register::adjustColumn(int col) and Register::resize(int col, bool force), which are much the same as in the original submission.
This will ensure each column is wide enough for its data, so no need (or ability) for the user to resize any individual columns. Also, at the moment, while entering or editing a transaction, the width of all the edit edit boxes is considerably hidden by calculator or date entry buttons. This is improved, and the number column width can expand while editing, so the user can actually see all of his entry, instead of it scrolling out of sight.
The whole window may be resized, as now, but I'm abandoning the long-standing issue of investment edit widgets appearing/disappearing illogically.
The overall size of the patch is much reduced.
I hope you agree for me to proceed with this.
</pre>
<br />
<p>- Allan</p>
<br />
<p>On August 29th, 2013, 5:12 p.m. UTC, Allan Anderson 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 KMymoney.</div>
<div>By Allan Anderson.</div>
<p style="color: grey;"><i>Updated Aug. 29, 2013, 5:12 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;">If I choose to use a complex system for check numbers, such that the whole number is not visible,
the only way I have available is to stretch the whole window. However, even that doesn't help,
as the whole of the increase is grabbed by the Details column. I accept that it is likely that that
column is going to need to be the widest. Then, why are the Payment and Deposit columns twice the
width of the Balance column, when that column may be likely to have the greatest value? Ditto for
the Date.
This fix allows modification of column widths, but also resizes the individual columns to more suitable widths.
I found that Thomas had started to implement something similar some while ago, so I have built upon and expanded that.
I found that the edit widgets were particularly troublesome, in failing to appear/disappear with the show() and hide()
methods, which I'd previously found when last in this area. Then, when the screen was being resized, they flickered
more than acceptable. Eventually, where necessary, I resorted to zeroing/resetting the height instead, which resolved
the issue, although with some complication.</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;">Extensive editing of sample files, and changing back and forth between different activity types, which tended to show
problem areas. atype run.
</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=312816">312816</a>,
<a href="http://bugs.kde.org/show_bug.cgi?id=322768">322768</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>kmymoney/dialogs/investactivities.cpp <span style="color: grey">(50f33ed)</span></li>
<li>kmymoney/dialogs/investtransactioneditor.h <span style="color: grey">(3e62c2a)</span></li>
<li>kmymoney/dialogs/investtransactioneditor.cpp <span style="color: grey">(e9f87fb)</span></li>
<li>kmymoney/dialogs/transactioneditor.h <span style="color: grey">(f07dafb)</span></li>
<li>kmymoney/dialogs/transactioneditor.cpp <span style="color: grey">(39049cf)</span></li>
<li>kmymoney/views/kgloballedgerview.h <span style="color: grey">(04a6303)</span></li>
<li>kmymoney/views/kgloballedgerview.cpp <span style="color: grey">(78d98b2)</span></li>
<li>kmymoney/widgets/register.h <span style="color: grey">(eebe78d)</span></li>
<li>kmymoney/widgets/register.cpp <span style="color: grey">(1bdf5bd)</span></li>
<li>kmymoney/widgets/transactionform.cpp <span style="color: grey">(642e98f)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/112364/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>