Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-03 Thread Allan Anderson

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

(Updated Oct. 3, 2013, 10:23 a.m.)


Status
--

This change has been marked as submitted.


Review request for KMymoney.


Bugs: 322768
http://bugs.kde.org/show_bug.cgi?id=322768


Repository: kmymoney


Description
---

- Interest category disappears -
Steps to Reproduce:
1.Open a new Dividend transaction.
2.Enter an interest category and amount.
3.Enter a new fee category.
4.On accepting the new category, the interest category and amount have been 
cleared.
One line fix in kmymoney/dialogs/transactioneditor.cpp.

- Fixes for KEditWidget visibility issues.
 When editing an investment transaction, interest or fee edit widgets show or 
hide incorrectly.  This is a fairly long-standing issue, and there have been 
attempts to fix by delaying the show() or hide() instructions.  This became 
more pronounced during work to allow column resizing, and Cristian produced a 
fix for the root cause.  This fix is included here.
With the above fix in place, it became necessary to revert the delayed show() 
and hide() calls, and this has been done.
Of course, nothing is ever as simple as that, and another couple of issues 
emerged.  Whether or not an interest or fee amount widget is shown depends on 
the presence or absence of the associated category's text.  It transpired that 
if, say, an existing Reinvest transaction was edited to be, say a Buy 
transaction,  the text from the Reinvest interest category was seen by the new 
Buy entry and resulted in the interest-amount widget being visible when none 
should appear.  Similarly, if a transaction with a fee set is edited to be a 
type with no fee expected, for instance, an Add or RemoveShares, then the 
fee-amount widget became visible when not needed.
It was necessary to rework the slotUpdateFeeVisibility() and 
slotUpdateInterestVisibility() functions to take account of the new transaction 
type.


Diffs
-

  kmymoney/dialogs/investactivities.cpp 50f33ed 
  kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
  kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
  kmymoney/dialogs/transactioneditor.cpp cfb0f71 
  kmymoney/widgets/transactioneditorcontainer.h f77b195 

Diff: http://git.reviewboard.kde.org/r/112947/diff/


Testing
---

Entering and editing various transaction types to ensure only the appropriate 
widgets became visible or hidden when required.


Thanks,

Allan Anderson

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-02 Thread Cristian Oneț

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

Ship it!


It looks good.

- Cristian Oneț


On Oct. 2, 2013, 4:06 p.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Oct. 2, 2013, 4:06 p.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp cfb0f71 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-02 Thread Allan Anderson

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

(Updated Oct. 2, 2013, 4:06 p.m.)


Review request for KMymoney.


Changes
---

Removed errors included in last patch.
Very minor format and white-space issues included.
Tested again and double-checked.


Bugs: 322768
http://bugs.kde.org/show_bug.cgi?id=322768


Repository: kmymoney


Description
---

- Interest category disappears -
Steps to Reproduce:
1.Open a new Dividend transaction.
2.Enter an interest category and amount.
3.Enter a new fee category.
4.On accepting the new category, the interest category and amount have been 
cleared.
One line fix in kmymoney/dialogs/transactioneditor.cpp.

- Fixes for KEditWidget visibility issues.
 When editing an investment transaction, interest or fee edit widgets show or 
hide incorrectly.  This is a fairly long-standing issue, and there have been 
attempts to fix by delaying the show() or hide() instructions.  This became 
more pronounced during work to allow column resizing, and Cristian produced a 
fix for the root cause.  This fix is included here.
With the above fix in place, it became necessary to revert the delayed show() 
and hide() calls, and this has been done.
Of course, nothing is ever as simple as that, and another couple of issues 
emerged.  Whether or not an interest or fee amount widget is shown depends on 
the presence or absence of the associated category's text.  It transpired that 
if, say, an existing Reinvest transaction was edited to be, say a Buy 
transaction,  the text from the Reinvest interest category was seen by the new 
Buy entry and resulted in the interest-amount widget being visible when none 
should appear.  Similarly, if a transaction with a fee set is edited to be a 
type with no fee expected, for instance, an Add or RemoveShares, then the 
fee-amount widget became visible when not needed.
It was necessary to rework the slotUpdateFeeVisibility() and 
slotUpdateInterestVisibility() functions to take account of the new transaction 
type.


Diffs (updated)
-

  kmymoney/dialogs/investactivities.cpp 50f33ed 
  kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
  kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
  kmymoney/dialogs/transactioneditor.cpp cfb0f71 
  kmymoney/widgets/transactioneditorcontainer.h f77b195 

Diff: http://git.reviewboard.kde.org/r/112947/diff/


Testing
---

Entering and editing various transaction types to ensure only the appropriate 
widgets became visible or hidden when required.


Thanks,

Allan Anderson

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-02 Thread Allan Anderson


On Oct. 2, 2013, 4:31 a.m., Allan Anderson wrote:
> > It seems that there was a problem in the way you created the new patch. You 
> > mixed in some other patches and undid some recents commits with it so it 
> > can't be shipped unless you fix that.
> 
> Cristian Oneț wrote:
> No problem, I mean the patch is fine, just that it contains more then it 
> should. I agree that it's a pain to keep working with the old version of 
> astyle. I'll have a look at how we could update to the never version.

The unholy mess resolved, revised patch to follow.


- Allan


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


On Oct. 1, 2013, 7:33 p.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Oct. 1, 2013, 7:33 p.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp cfb0f71 
>   kmymoney/widgets/kmymoneydateinput.cpp 856efaa 
>   kmymoney/widgets/register.h 50ce759 
>   kmymoney/widgets/register.cpp d5dd639 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
>   kmymoney/widgets/transactionform.cpp 642e98f 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-02 Thread Cristian Oneț


On Oct. 2, 2013, 4:31 a.m., Allan Anderson wrote:
> > It seems that there was a problem in the way you created the new patch. You 
> > mixed in some other patches and undid some recents commits with it so it 
> > can't be shipped unless you fix that.

No problem, I mean the patch is fine, just that it contains more then it 
should. I agree that it's a pain to keep working with the old version of 
astyle. I'll have a look at how we could update to the never version.


- Cristian


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


On Oct. 1, 2013, 7:33 p.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Oct. 1, 2013, 7:33 p.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp cfb0f71 
>   kmymoney/widgets/kmymoneydateinput.cpp 856efaa 
>   kmymoney/widgets/register.h 50ce759 
>   kmymoney/widgets/register.cpp d5dd639 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
>   kmymoney/widgets/transactionform.cpp 642e98f 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-02 Thread Allan Anderson


> On Oct. 2, 2013, 4:31 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 1402
> > 
> >
> > Why are you undoing this change I've made some days ago? 
> > https://projects.kde.org/projects/extragear/office/kmymoney/repository/revisions/092f3a79f4ec74d25e0f5a4b9c80dfef64db5da3
> > 
> > Are you sure that you have the patch against master?

Cristian, I'm truly sorry.  I'd upgraded my system, and with it came astyle 
2.01.  When I ran astyle, it totally swamped my working directory with changes 
(> 500) and became useless.  I think one of the parameters was wrong or 
missing. I started again from master, and applied the first patch.  For my 
later changes I resorted to the pre-astyle files, totally failing to appreciate 
that you had changes to some of those files in master, and which therefore were 
over-written.
I'm really sorry, and must try now to unscramble things properly.


- Allan


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


On Oct. 1, 2013, 7:33 p.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Oct. 1, 2013, 7:33 p.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp cfb0f71 
>   kmymoney/widgets/kmymoneydateinput.cpp 856efaa 
>   kmymoney/widgets/register.h 50ce759 
>   kmymoney/widgets/register.cpp d5dd639 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
>   kmymoney/widgets/transactionform.cpp 642e98f 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-01 Thread Cristian Oneț

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



kmymoney/dialogs/transactioneditor.cpp


Why are you undoing this change I've made some days ago? 
https://projects.kde.org/projects/extragear/office/kmymoney/repository/revisions/092f3a79f4ec74d25e0f5a4b9c80dfef64db5da3

Are you sure that you have the patch against master?



kmymoney/widgets/kmymoneydateinput.cpp


This is part of a patch I posted for review, again are you sure that you 
have in this patch only your changes against master? 
https://git.reviewboard.kde.org/r/112989/



kmymoney/widgets/register.h


Belongs to https://git.reviewboard.kde.org/r/112989/



kmymoney/widgets/register.cpp


All the changes to this file belong to 
https://git.reviewboard.kde.org/r/112989/


It seems that there was a problem in the way you created the new patch. You 
mixed in some other patches and undid some recents commits with it so it can't 
be shipped unless you fix that.

- Cristian Oneț


On Oct. 1, 2013, 7:33 p.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Oct. 1, 2013, 7:33 p.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp cfb0f71 
>   kmymoney/widgets/kmymoneydateinput.cpp 856efaa 
>   kmymoney/widgets/register.h 50ce759 
>   kmymoney/widgets/register.cpp d5dd639 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
>   kmymoney/widgets/transactionform.cpp 642e98f 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-01 Thread Allan Anderson


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.
> 
> Allan Anderson wrote:
> Yes it is.  As explained above, the data in the widget is the name of the 
> interest category, but we're dealing now with a new fee category.  If we 
> clear this text, the interest category has lost its name and it needs to be 
> added again once the fee category dialog closes.
> It definitely fixes the issue, but whether there is something deeper, I 
> don't know.
> 
> Cristian Oneț wrote:
> See my question above, when accepting the transaction what will be the 
> value of 'categoryId' if it has been cleared and only the name was kept? Is 
> it being recomputed based on the name which was kept?
> 
> Allan Anderson wrote:
> 'categoryId' is empty on entry, in these circumstances - when adding a 
> new category.  Editing an existing one doesn't come here.
> 
> Cristian Oneț wrote:
> OK, then it's safe.
> 
> Allan Anderson wrote:
> Not pushing, but want to be certain whether that means OK to ship, or 
> just you're OK with that particular point?  Didn't want it to be in limbo.
> Tidied up and retested.  All looks OK with no flicker.
>
> 
> Cristian Oneț wrote:
> I was waiting for the updated patch to fix the other issues we've 
> discussed in this review request to give this patch the 'Ship it!'.
> 
> Allan Anderson wrote:
> Sorry to be dim, but which issues do you mean?  If you mean the column 
> width issues, I thought your patch was all you wanted on that.  Perhaps I 
> misunderstood?
> 
> Cristian Oneț wrote:
> I've added a comment to signal the issues in this review request which I 
> consider still open.

These points had already been attended to.  Revised patch following


- Allan


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp 39049cf 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson

Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-01 Thread Allan Anderson

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

(Updated Oct. 1, 2013, 7:33 p.m.)


Review request for KMymoney.


Changes
---

New patch to resolve outstanding points.


Bugs: 322768
http://bugs.kde.org/show_bug.cgi?id=322768


Repository: kmymoney


Description
---

- Interest category disappears -
Steps to Reproduce:
1.Open a new Dividend transaction.
2.Enter an interest category and amount.
3.Enter a new fee category.
4.On accepting the new category, the interest category and amount have been 
cleared.
One line fix in kmymoney/dialogs/transactioneditor.cpp.

- Fixes for KEditWidget visibility issues.
 When editing an investment transaction, interest or fee edit widgets show or 
hide incorrectly.  This is a fairly long-standing issue, and there have been 
attempts to fix by delaying the show() or hide() instructions.  This became 
more pronounced during work to allow column resizing, and Cristian produced a 
fix for the root cause.  This fix is included here.
With the above fix in place, it became necessary to revert the delayed show() 
and hide() calls, and this has been done.
Of course, nothing is ever as simple as that, and another couple of issues 
emerged.  Whether or not an interest or fee amount widget is shown depends on 
the presence or absence of the associated category's text.  It transpired that 
if, say, an existing Reinvest transaction was edited to be, say a Buy 
transaction,  the text from the Reinvest interest category was seen by the new 
Buy entry and resulted in the interest-amount widget being visible when none 
should appear.  Similarly, if a transaction with a fee set is edited to be a 
type with no fee expected, for instance, an Add or RemoveShares, then the 
fee-amount widget became visible when not needed.
It was necessary to rework the slotUpdateFeeVisibility() and 
slotUpdateInterestVisibility() functions to take account of the new transaction 
type.


Diffs (updated)
-

  kmymoney/dialogs/investactivities.cpp 50f33ed 
  kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
  kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
  kmymoney/dialogs/transactioneditor.cpp cfb0f71 
  kmymoney/widgets/kmymoneydateinput.cpp 856efaa 
  kmymoney/widgets/register.h 50ce759 
  kmymoney/widgets/register.cpp d5dd639 
  kmymoney/widgets/transactioneditorcontainer.h f77b195 
  kmymoney/widgets/transactionform.cpp 642e98f 

Diff: http://git.reviewboard.kde.org/r/112947/diff/


Testing
---

Entering and editing various transaction types to ensure only the appropriate 
widgets became visible or hidden when required.


Thanks,

Allan Anderson

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-01 Thread Cristian Oneț


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.
> 
> Allan Anderson wrote:
> Yes it is.  As explained above, the data in the widget is the name of the 
> interest category, but we're dealing now with a new fee category.  If we 
> clear this text, the interest category has lost its name and it needs to be 
> added again once the fee category dialog closes.
> It definitely fixes the issue, but whether there is something deeper, I 
> don't know.
> 
> Cristian Oneț wrote:
> See my question above, when accepting the transaction what will be the 
> value of 'categoryId' if it has been cleared and only the name was kept? Is 
> it being recomputed based on the name which was kept?
> 
> Allan Anderson wrote:
> 'categoryId' is empty on entry, in these circumstances - when adding a 
> new category.  Editing an existing one doesn't come here.
> 
> Cristian Oneț wrote:
> OK, then it's safe.
> 
> Allan Anderson wrote:
> Not pushing, but want to be certain whether that means OK to ship, or 
> just you're OK with that particular point?  Didn't want it to be in limbo.
> Tidied up and retested.  All looks OK with no flicker.
>
> 
> Cristian Oneț wrote:
> I was waiting for the updated patch to fix the other issues we've 
> discussed in this review request to give this patch the 'Ship it!'.
> 
> Allan Anderson wrote:
> Sorry to be dim, but which issues do you mean?  If you mean the column 
> width issues, I thought your patch was all you wanted on that.  Perhaps I 
> misunderstood?

I've added a comment to signal the issues in this review request which I 
consider still open.


- Cristian


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp 39049cf 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@k

Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-01 Thread Cristian Oneț


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investactivities.cpp, line 394
> > 
> >
> > does the ending '///' mean anything? if this is a placeholder to search 
> > for maybe a textual comment would be better suited
> 
> Allan Anderson wrote:
> Oops. Yes, it's a placeholder, that I use to search for changes I've 
> made.  I tend not to use it much nowadays.  I should have removed it, but it 
> was getting very late and I slipped up.  There may be one or two others as 
> well.
> 
> Cristian Oneț wrote:
> Yes there are other I only signaled this one, no need to rush with the 
> patch :).

This still needs to be fixed (remove markers or add a better comment).


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investactivities.cpp, line 701
> > 
> >
> > Please run astyle-kmymoney.sh before pushing the commit.
> 
> Allan Anderson wrote:
> I did have it the 'correct' way at first, but noticed that there was 'if 
> (w) w->hide()' a few lines above, so changed it because it looked 'wrong' in 
> that context.  I'll change them both.  I usually use {} even for a one-liner, 
> but don't change existing code.  There are too many.

This still needs to be fixed - run astyle-kmymoney.sh.


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investtransactioneditor.cpp, line 528
> > 
> >
> > Could this:
> > if (cond) {} else if (cond) {}
> > be written in a more readable manner? I would write something like:
> > if (cond) {} else {}
> > since all activity types are either in one or the other codition.
> 
> Allan Anderson wrote:
> In general, then that is what I would do.  I decided not to do it here 
> because it provided immediate information on what was dealt with where, with 
> there being so many different activity types.
> However, I could make it a comment instead, but I would like to leave the 
> information there, for clarity.
> Perhaps also remove the existing comment above which doesn't seem to 
> apply any more?
> 
> Cristian Oneț wrote:
> Please feel free to remove any comments which are not valid anymore (the 
> same applies for commented code).

This needs to be solved. I do not agree that each Activity should be checked 
individually on the else block.


- Cristian


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction 

Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-01 Thread Allan Anderson


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.
> 
> Allan Anderson wrote:
> Yes it is.  As explained above, the data in the widget is the name of the 
> interest category, but we're dealing now with a new fee category.  If we 
> clear this text, the interest category has lost its name and it needs to be 
> added again once the fee category dialog closes.
> It definitely fixes the issue, but whether there is something deeper, I 
> don't know.
> 
> Cristian Oneț wrote:
> See my question above, when accepting the transaction what will be the 
> value of 'categoryId' if it has been cleared and only the name was kept? Is 
> it being recomputed based on the name which was kept?
> 
> Allan Anderson wrote:
> 'categoryId' is empty on entry, in these circumstances - when adding a 
> new category.  Editing an existing one doesn't come here.
> 
> Cristian Oneț wrote:
> OK, then it's safe.
> 
> Allan Anderson wrote:
> Not pushing, but want to be certain whether that means OK to ship, or 
> just you're OK with that particular point?  Didn't want it to be in limbo.
> Tidied up and retested.  All looks OK with no flicker.
>
> 
> Cristian Oneț wrote:
> I was waiting for the updated patch to fix the other issues we've 
> discussed in this review request to give this patch the 'Ship it!'.

Sorry to be dim, but which issues do you mean?  If you mean the column width 
issues, I thought your patch was all you wanted on that.  Perhaps I 
misunderstood?


- Allan


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp 39049cf 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-01 Thread Cristian Oneț


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.
> 
> Allan Anderson wrote:
> Yes it is.  As explained above, the data in the widget is the name of the 
> interest category, but we're dealing now with a new fee category.  If we 
> clear this text, the interest category has lost its name and it needs to be 
> added again once the fee category dialog closes.
> It definitely fixes the issue, but whether there is something deeper, I 
> don't know.
> 
> Cristian Oneț wrote:
> See my question above, when accepting the transaction what will be the 
> value of 'categoryId' if it has been cleared and only the name was kept? Is 
> it being recomputed based on the name which was kept?
> 
> Allan Anderson wrote:
> 'categoryId' is empty on entry, in these circumstances - when adding a 
> new category.  Editing an existing one doesn't come here.
> 
> Cristian Oneț wrote:
> OK, then it's safe.
> 
> Allan Anderson wrote:
> Not pushing, but want to be certain whether that means OK to ship, or 
> just you're OK with that particular point?  Didn't want it to be in limbo.
> Tidied up and retested.  All looks OK with no flicker.
>

I was waiting for the updated patch to fix the other issues we've discussed in 
this review request to give this patch the 'Ship it!'.


- Cristian


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp 39049cf 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-10-01 Thread Allan Anderson


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.
> 
> Allan Anderson wrote:
> Yes it is.  As explained above, the data in the widget is the name of the 
> interest category, but we're dealing now with a new fee category.  If we 
> clear this text, the interest category has lost its name and it needs to be 
> added again once the fee category dialog closes.
> It definitely fixes the issue, but whether there is something deeper, I 
> don't know.
> 
> Cristian Oneț wrote:
> See my question above, when accepting the transaction what will be the 
> value of 'categoryId' if it has been cleared and only the name was kept? Is 
> it being recomputed based on the name which was kept?
> 
> Allan Anderson wrote:
> 'categoryId' is empty on entry, in these circumstances - when adding a 
> new category.  Editing an existing one doesn't come here.
> 
> Cristian Oneț wrote:
> OK, then it's safe.

Not pushing, but want to be certain whether that means OK to ship, or just 
you're OK with that particular point?  Didn't want it to be in limbo.
Tidied up and retested.  All looks OK with no flicker.


- Allan


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Bugs: 322768
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Repository: kmymoney
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp 39049cf 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-09-26 Thread Jack

[just to the list, not the review request]

On 2013.09.26 06:00, Cristian Oneț wrote:
Reading  
http://kmymoney2.sourceforge.net/kde4/online-manual/details.investments.ledger.html#idp38934400  
I didn't manage to get a good idea of which widgets should be visible  
or not depending on the investment action so I can't say anything  
about the functionality (other then it looks good and is without  
flickering). Maybe it would be a good idea to document each action in  
more detail, but I'm not requesting you this. The rest of my comments  
are strictly with my programmer's hat on.


I'll add this to the list of documentation stuff that needs to be  
addressed, hopefully before 4.7.  However, in this case, the docs  
should probably state what the program does, rather than expecting the  
program to do what the docs show.


Jack
___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-09-26 Thread Cristian Oneț


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.
> 
> Allan Anderson wrote:
> Yes it is.  As explained above, the data in the widget is the name of the 
> interest category, but we're dealing now with a new fee category.  If we 
> clear this text, the interest category has lost its name and it needs to be 
> added again once the fee category dialog closes.
> It definitely fixes the issue, but whether there is something deeper, I 
> don't know.
> 
> Cristian Oneț wrote:
> See my question above, when accepting the transaction what will be the 
> value of 'categoryId' if it has been cleared and only the name was kept? Is 
> it being recomputed based on the name which was kept?
> 
> Allan Anderson wrote:
> 'categoryId' is empty on entry, in these circumstances - when adding a 
> new category.  Editing an existing one doesn't come here.

OK, then it's safe.


- Cristian


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> This addresses bug 322768.
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp 39049cf 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-09-26 Thread Allan Anderson


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.
> 
> Allan Anderson wrote:
> Yes it is.  As explained above, the data in the widget is the name of the 
> interest category, but we're dealing now with a new fee category.  If we 
> clear this text, the interest category has lost its name and it needs to be 
> added again once the fee category dialog closes.
> It definitely fixes the issue, but whether there is something deeper, I 
> don't know.
> 
> Cristian Oneț wrote:
> See my question above, when accepting the transaction what will be the 
> value of 'categoryId' if it has been cleared and only the name was kept? Is 
> it being recomputed based on the name which was kept?

'categoryId' is empty on entry, in these circumstances - when adding a new 
category.  Editing an existing one doesn't come here.


- Allan


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> This addresses bug 322768.
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp 39049cf 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only the appropriate 
> widgets became visible or hidden when required.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-09-26 Thread Cristian Oneț


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investactivities.cpp, line 394
> > 
> >
> > does the ending '///' mean anything? if this is a placeholder to search 
> > for maybe a textual comment would be better suited
> 
> Allan Anderson wrote:
> Oops. Yes, it's a placeholder, that I use to search for changes I've 
> made.  I tend not to use it much nowadays.  I should have removed it, but it 
> was getting very late and I slipped up.  There may be one or two others as 
> well.

Yes there are other I only signaled this one, no need to rush with the patch :).


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investtransactioneditor.cpp, line 499
> > 
> >
> > I would go with something like this to make it more readable.
> > const bool hideFee = txt.isEmpty() || d->m_activity->type() == 
> > MyMoneySplit::AddShares || .. the rest of the activities which don't have a 
> > fee
> > if (hideFee) {
> >   l->setText("");
> >   feeAmount->hide();
> > } else {
> >   l->setText(i18n("Fee Amount"));
> >   feeAmount->show();
> > }
> 
> Allan Anderson wrote:
> I like that.  I had to add the declaration for label 'l', and add tests 
> for it to avoid crashing when not using the form.
> Perhaps I should try similar for the interest method.

Yes, the label must be tested for it's existence.


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investtransactioneditor.cpp, line 528
> > 
> >
> > Could this:
> > if (cond) {} else if (cond) {}
> > be written in a more readable manner? I would write something like:
> > if (cond) {} else {}
> > since all activity types are either in one or the other codition.
> 
> Allan Anderson wrote:
> In general, then that is what I would do.  I decided not to do it here 
> because it provided immediate information on what was dealt with where, with 
> there being so many different activity types.
> However, I could make it a comment instead, but I would like to leave the 
> information there, for clarity.
> Perhaps also remove the existing comment above which doesn't seem to 
> apply any more?

Please feel free to remove any comments which are not valid anymore (the same 
applies for commented code).


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 462
> > 
> >
> > If the category id is cleared here then why shouldn't the category 
> > editor widget be cleared two lines bellow?
> 
> Allan Anderson wrote:
> Here, I deliberately left in the '///' as I felt a comment was needed, 
> but I'll reposition them slightly.
> 
> This was the cause of the problem.  Here, the text was the category name 
> from the existing interest category, but we are now here because a fee 
> category has just been added. If cleared here, the name of the interest 
> category gets removed and has to be reentered.

OK, I understand that but my dilemma is this: Why is it OK to clear the 
'categoryId' and not clear the category name held by the edit widget? I'll look 
into this a bit more later.


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.
> 
> Allan Anderson wrote:
> Yes it is.  As explained above, the data in the widget is the name of the 
> interest category, but we're dealing now with a new fee category.  If we 
> clear this text, the interest category has lost its name and it needs to be 
> added again once the fee category dialog closes.
> It definitely fixes the issue, but whether there is something deeper, I 
> don't know.

See my question above, when accepting the transaction what will be the value of 
'categoryId' if it has been cleared and only the name was kept? Is it being 
recomputed based on the name which was kept?


- Cristian


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Revi

Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-09-26 Thread Allan Anderson


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investactivities.cpp, line 394
> > 
> >
> > does the ending '///' mean anything? if this is a placeholder to search 
> > for maybe a textual comment would be better suited

Oops. Yes, it's a placeholder, that I use to search for changes I've made.  I 
tend not to use it much nowadays.  I should have removed it, but it was getting 
very late and I slipped up.  There may be one or two others as well.


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investactivities.cpp, line 701
> > 
> >
> > Please run astyle-kmymoney.sh before pushing the commit.

I did have it the 'correct' way at first, but noticed that there was 'if (w) 
w->hide()' a few lines above, so changed it because it looked 'wrong' in that 
context.  I'll change them both.  I usually use {} even for a one-liner, but 
don't change existing code.  There are too many.


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investtransactioneditor.cpp, line 499
> > 
> >
> > I would go with something like this to make it more readable.
> > const bool hideFee = txt.isEmpty() || d->m_activity->type() == 
> > MyMoneySplit::AddShares || .. the rest of the activities which don't have a 
> > fee
> > if (hideFee) {
> >   l->setText("");
> >   feeAmount->hide();
> > } else {
> >   l->setText(i18n("Fee Amount"));
> >   feeAmount->show();
> > }

I like that.  I had to add the declaration for label 'l', and add tests for it 
to avoid crashing when not using the form.
Perhaps I should try similar for the interest method.


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/investtransactioneditor.cpp, line 528
> > 
> >
> > Could this:
> > if (cond) {} else if (cond) {}
> > be written in a more readable manner? I would write something like:
> > if (cond) {} else {}
> > since all activity types are either in one or the other codition.

In general, then that is what I would do.  I decided not to do it here because 
it provided immediate information on what was dealt with where, with there 
being so many different activity types.
However, I could make it a comment instead, but I would like to leave the 
information there, for clarity.
Perhaps also remove the existing comment above which doesn't seem to apply any 
more?


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 462
> > 
> >
> > If the category id is cleared here then why shouldn't the category 
> > editor widget be cleared two lines bellow?

Here, I deliberately left in the '///' as I felt a comment was needed, but I'll 
reposition them slightly.

This was the cause of the problem.  Here, the text was the category name from 
the existing interest category, but we are now here because a fee category has 
just been added. If cleared here, the name of the interest category gets 
removed and has to be reentered.


> On Sept. 26, 2013, 10 a.m., Cristian Oneț wrote:
> > kmymoney/dialogs/transactioneditor.cpp, line 464
> > 
> >
> > Are you sure that this is valid since   categoryId.clear() is 
> > called above? This only keeps the data in the widget.

Yes it is.  As explained above, the data in the widget is the name of the 
interest category, but we're dealing now with a new fee category.  If we clear 
this text, the interest category has lost its name and it needs to be added 
again once the fee category dialog closes.
It definitely fixes the issue, but whether there is something deeper, I don't 
know.


- Allan


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


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> O

Re: [Kmymoney-devel] Review Request 112947: BUG:322768 - Interest category and amount disappear when new fee entered in Dividend. Also, fixes for KEditWidget visibility issues.

2013-09-26 Thread Cristian Oneț

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


Reading 
http://kmymoney2.sourceforge.net/kde4/online-manual/details.investments.ledger.html#idp38934400
 I didn't manage to get a good idea of which widgets should be visible or not 
depending on the investment action so I can't say anything about the 
functionality (other then it looks good and is without flickering). Maybe it 
would be a good idea to document each action in more detail, but I'm not 
requesting you this. The rest of my comments are strictly with my programmer's 
hat on.


kmymoney/dialogs/investactivities.cpp


does the ending '///' mean anything? if this is a placeholder to search for 
maybe a textual comment would be better suited



kmymoney/dialogs/investactivities.cpp


Please run astyle-kmymoney.sh before pushing the commit.



kmymoney/dialogs/investtransactioneditor.cpp


I would go with something like this to make it more readable.
const bool hideFee = txt.isEmpty() || d->m_activity->type() == 
MyMoneySplit::AddShares || .. the rest of the activities which don't have a fee
if (hideFee) {
  l->setText("");
  feeAmount->hide();
} else {
  l->setText(i18n("Fee Amount"));
  feeAmount->show();
}



kmymoney/dialogs/investtransactioneditor.cpp


Could this:
if (cond) {} else if (cond) {}
be written in a more readable manner? I would write something like:
if (cond) {} else {}
since all activity types are either in one or the other codition.



kmymoney/dialogs/transactioneditor.cpp


If the category id is cleared here then why shouldn't the category editor 
widget be cleared two lines bellow?



kmymoney/dialogs/transactioneditor.cpp


Are you sure that this is valid since   categoryId.clear() is called 
above? This only keeps the data in the widget.


- Cristian Oneț


On Sept. 26, 2013, 12:03 a.m., Allan Anderson wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112947/
> ---
> 
> (Updated Sept. 26, 2013, 12:03 a.m.)
> 
> 
> Review request for KMymoney.
> 
> 
> Description
> ---
> 
> - Interest category disappears -
> Steps to Reproduce:
> 1.Open a new Dividend transaction.
> 2.Enter an interest category and amount.
> 3.Enter a new fee category.
> 4.On accepting the new category, the interest category and amount have been 
> cleared.
> One line fix in kmymoney/dialogs/transactioneditor.cpp.
> 
> - Fixes for KEditWidget visibility issues.
>  When editing an investment transaction, interest or fee edit widgets show or 
> hide incorrectly.  This is a fairly long-standing issue, and there have been 
> attempts to fix by delaying the show() or hide() instructions.  This became 
> more pronounced during work to allow column resizing, and Cristian produced a 
> fix for the root cause.  This fix is included here.
> With the above fix in place, it became necessary to revert the delayed show() 
> and hide() calls, and this has been done.
> Of course, nothing is ever as simple as that, and another couple of issues 
> emerged.  Whether or not an interest or fee amount widget is shown depends on 
> the presence or absence of the associated category's text.  It transpired 
> that if, say, an existing Reinvest transaction was edited to be, say a Buy 
> transaction,  the text from the Reinvest interest category was seen by the 
> new Buy entry and resulted in the interest-amount widget being visible when 
> none should appear.  Similarly, if a transaction with a fee set is edited to 
> be a type with no fee expected, for instance, an Add or RemoveShares, then 
> the fee-amount widget became visible when not needed.
> It was necessary to rework the slotUpdateFeeVisibility() and 
> slotUpdateInterestVisibility() functions to take account of the new 
> transaction type.
> 
> 
> This addresses bug 322768.
> http://bugs.kde.org/show_bug.cgi?id=322768
> 
> 
> Diffs
> -
> 
>   kmymoney/dialogs/investactivities.cpp 50f33ed 
>   kmymoney/dialogs/investtransactioneditor.h 3e62c2a 
>   kmymoney/dialogs/investtransactioneditor.cpp e9f87fb 
>   kmymoney/dialogs/transactioneditor.cpp 39049cf 
>   kmymoney/widgets/transactioneditorcontainer.h f77b195 
> 
> Diff: http://git.reviewboard.kde.org/r/112947/diff/
> 
> 
> Testing
> ---
> 
> Entering and editing various transaction types to ensure only th