[kmymoney] [Bug 491828] Currency settings show incorrect

Ralf Habacker bugzilla_noreply at kde.org
Mon Aug 19 14:46:51 BST 2024


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

Ralf Habacker <ralf.habacker at freenet.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ralf.habacker at freenet.de

--- Comment #2 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to Thomas Baumgart from comment #1)
> Very strange behavior which differs on Linux and Windows:

To exclude influences from the entire application, I suggest inserting an
additional unit test in kmymoney/mymoney/tests/mymoneysecurity-test.cpp, e.g. 

void MyMoneySecurityTest::testSmallestAccountUnit()
{
    MyMoneySecurity currency("BTC", "Bitcoin", "BTC", 100000000, 100000000);
    int precision =
MyMoneyMoney::denomToPrec(currency.smallestAccountFraction());
    MyMoneyMoney smallestFraction = MyMoneyMoney::ONE /
MyMoneyMoney(currency.smallestAccountFraction());
    QCOMPARE(smallestFraction.formatMoney(QString(), precision),
QLatin1String("0.00000001"));
}

which can then be used more easily for debugging.

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


More information about the KMyMoney-devel mailing list