[Kmymoney-devel] Review Request 107714: BUG:311481 - Fix problem in Schedules where the name field may be empty but OK button is enabled. Also, the amount field affects the OK button status.

Allan Anderson agander93 at gmail.com
Mon May 6 10:33:40 UTC 2013


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

(Updated May 6, 2013, 10:33 a.m.)


Review request for KMymoney.


Changes
-------

Having to reopen this as a clash with https://git.reviewboard.kde.org/r/109043/ has been discovered.
A combined patch for both issues is submitted here.
There were previous commits submitted for this issue.  This patch includes those, for ease of review.  In addition, the majority of this change is in /kmymoney/widgets/kguiutils.cpp, where additional mandatory fields had to be added, isolating the functionality of Schedules view from the Ledger view handling of Enter button enabling.


Description
-------

The problem as originally reported was that in Schedules view, the OK button became enabled even though no schedule name had been entered.

It was found that the button became enabled as soon as a payee was entered.  It was also found that this happened when an amount was entered.

For "payee", line 753 of transactioneditor.cpp has - 
"connect(payee,SIGNAL(textChanged(QString)),this,SLOT(slotUpdateButtonState()))", and slotUpdateButtonState() has - 
"emit transactionDataSufficient(isComplete(reason)", 
and 'This signal is sent out whenever enough data is present to enter the transaction into the ledger.'

Similarly, for "amount", at line 826, the same line appears.

As neither of these fields is a mandatory one, I believe they should not affect the OK button status.  So, as shown in the patch, I have temporarily disabled these lines.  I have done numerous tests of schedule creation and editing, and manual entry and editing of transactions without any problem.

The same area of code in transactioneditor.cpp has several more of these possibly unneeded lines, although not affecting schedules.  For instance, even with these two lines out and with no mandatory fields completed, if a payee is selected and the memo, tag field, next due date or status is edited, the OK button again is enabled wrongly.

I don't really see any valid reason for 'slotUpdateButtonState()' to be in this section.  What do the wise men think?


This addresses bugs 311481, 314955 and 316111.
    http://bugs.kde.org/show_bug.cgi?id=311481
    http://bugs.kde.org/show_bug.cgi?id=314955
    http://bugs.kde.org/show_bug.cgi?id=316111


Diffs (updated)
-----

  kmymoney/dialogs/investactivities.cpp 2008f5e 
  kmymoney/dialogs/keditscheduledlg.cpp f3146f3 
  kmymoney/dialogs/transactioneditor.cpp a6d7432 
  kmymoney/widgets/kguiutils.cpp 38ff0d2 
  kmymoney/widgets/register.cpp c167bcd 

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


Testing
-------

Numerous tests of schedule creation and editing, and manual entry and editing of transactions without any problem.


Thanks,

Allan Anderson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20130506/d048ad36/attachment-0001.html>


More information about the KMyMoney-devel mailing list