[Kmymoney-devel] Strange error on first time use.

Jack ostroffjh at sbcglobal.net
Mon Aug 16 04:42:28 CEST 2010


On 2010.08.15 21:48, Alvaro Soliverez wrote:
> The problem seems to be that on new files, account templates may not  
> have a currency at all, which confuses the consistency check. This  
> patch should fix it.
> 
> 
> --- mymoneyfile.cpp	(revision: 1164110)
> +++ mymoneyfile.cpp	(working copy)
> @@ -1781,7 +1781,8 @@
>    QList<MyMoneyAccount>::const_iterator account_it;
>    for (account_it = accList.constBegin(); account_it !=
> accList.constEnd(); ++account_it) {
>      MyMoneyAccount account = *account_it;
> -    if (!currencyList.contains(account.currencyId()) &&
> account.currencyId() != baseCurrency().id()) {
> +    if (!currencyList.contains(account.currencyId()) &&
> +        (account.currencyId() != baseCurrency().id() &&
> !account.currencyId().isEmpty())) {
>        //add the currency and the account-currency pair
>        currencyList.append(account.currencyId());
>        accountForeignCurrency.append(account);
> 
> Basically, skip the account if the currency is empty.

It took a few tries to undo the email line wrapping in the patch file,  
but it works for me.

One minor additional note - in the create account screen of the new  
file wizard, I'm not sure where the focus starts, but it's not on the  
account name, and I have to click there to enter it.

Jack


More information about the KMyMoney-devel mailing list