[Kmymoney-devel] [SOLVED] Trying to understand the code in GroupMarker::paintRegisterCell() [PATCH attached]

Marko Käning mk-lists at email.de
Sat Nov 26 15:11:13 UTC 2011


Hi Thomas & Cristian,

following you guys advice I've created a little patch against 180e5a0df69d421fb2141dd9906869df9b3188fd which implements the feature.

IT INDEED WORKS!!!! :-) :-) :-) I hope this will not only for me be a time-saver in case of hunting for missing or erroneously added wrong transactions to an online-mapped account.

	Now KMyMoney's ledger view will paint the "online statement balance" group marker in RED when it has found a discrepancy.

Please find the patch attached. I'd be very happy to see it included into KMyMoney's git.

BTW, in class GroupMarker I have found a member function isErronous():
---
   bool isErronous(void) const {
    return false;
  }
---
which always returns false. But the function is nowhere actually in use.

I added my own isErroneous() member function for now, but I figure the above function could be thrown out! Right?

BTW, there are two more of these:
---
$ find . -name "*.h" | xargs grep "isErronous"
./kmymoney/widgets/register.h:  bool isErronous(void) const {
./kmymoney/widgets/registeritem.h:  virtual bool isErronous(void) const = 0;
./kmymoney/widgets/transaction.h:  bool isErronous(void) const {
$
---
and I wonder whether their spelling could be changed accordingly to "isErroneous".

That's all for now.

Thanks so much for your invaluable help! Without your code suggestions this patch wouldn't exist. :-) I mean, I added only 5% of the code, in the end. ;-)

Have a nice weekend.

Greets,
Marko



-------------- next part --------------
A non-text attachment was scrubbed...
Name: online-balance-difference_highlight.patch.diff
Type: application/octet-stream
Size: 2803 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20111126/909b9866/attachment.obj>


More information about the KMyMoney-devel mailing list