[kmymoney] [Bug 439819] Issue with changing credit card limits

Jeremy Whiting bugzilla_noreply at kde.org
Sun Jul 18 01:34:22 BST 2021


https://bugs.kde.org/show_bug.cgi?id=439819

--- Comment #5 from Jeremy Whiting <jpwhiting at kde.org> ---
Thomas, thanks for the DebugView hint. That's a very useful tool. After a bit
of wrangling with craft on windows I think I found the problem. I'm just not
yet sure what the proper fix is. Here's what I found.

The locale settings from c++ lconv are saying for negative values use 0 :
Currency symbol and quantity surrounded by parentheses. (which equates to
eMyMoney::Money::ParensAround in KMM. That's fine all negative values on
windows have () around them, while on linux here they have - in front instead.
But because of that the AmountEditValidator marks (5000.00) as invalid and
changes it immediately to "" when loading an existing kmy file with credit
limits that are negative values.

So one of the following I guess is needed.
A) Make AmountEditValidator not derive from QDoubleValidator but instead be a
custom type that understands all the different notations in MyMoneyMoney
formatMoney
B) Only use the system eMyMoney::Money::signPosition in the html views, but not
when setting text in an AmountEdit

I can get a patch ready with either approach, just wasn't sure which made more
sense. Or maybe something completely different would be better?

In fiddling with this I also found I can't find a place to set how I want
negative values to appear in KMM on windows. Maybe it needs to be a new setting
at least on windows where the system locale's aren't editable? (Or maybe they
are editable, but I haven't yet found where?)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list