[Kmymoney-devel] Re: Review Request: Unable to add account: Account has invalid type

Allan Anderson agander93 at gmail.com
Tue May 31 21:48:46 CEST 2011



> On May 31, 2011, 7:33 p.m., Cristian Onet wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/converter/mymoneyqifreader.cpp, line 877
> > <http://svn.reviewboard.kde.org/r/6694/diff/1/?file=46317#file46317line877>
> >
> >     The second m_extractedLine != -1 is unnecessary since the first one will always have priority.

Sorry, but I must be missing something.

If the first extract line test fails and drops through to the second, the second 'empty' test is always going to fail, and the first test will have reset m_extractedLine to -1, so as I see it, the setup for the 'E' line will not occur?


- Allan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6694/#review10171
-----------------------------------------------------------


On May 31, 2011, 7:20 p.m., Allan Anderson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6694/
> -----------------------------------------------------------
> 
> (Updated May 31, 2011, 7:20 p.m.)
> 
> 
> Review request for kmymoney.
> 
> 
> Summary
> -------
> 
> I have a QIF file containing a category list including a large number of
> categories.  When I try to import, each entry produces the message 'Unable to
> add account: Account has invalid type'.  The only option given is 'OK', which
> produces the same message for the next category.   There are too many entries
> to continue, so KMM has to be aborted, and the user is none the wiser as to the
> record in question or the problem with it.
> 
> I'm pretty sure this file imported correctly under KMM 1.x and earlier.
> 
> If the file size is reduced and the messages accepted, the import proceeds but
> no categories get created.
> 
> The file format seems OK to me - here's the reduced version.
> 
> !Type:Cat
> NBonus
> I
> ^
> NCapital gains
> I
> ^
> NChild Benefit
> I
> ^
> NDiv Income
> I
> ^
> 
> The problem lies in MyMoneyQifReader::processCategoryEntry.
> 
> An "!extractLine('I').isEmpty()" (or 'E') test is performed.  If, as is likely, the line 
> contains only the 'I' or 'E', the test will return empty and no accounts get set up.
> 
> The test needs to confirm if either line is detected, empty or otherwise, and set up accordingly.
> 
> 
> This addresses bug 274598.
>     https://bugs.kde.org/show_bug.cgi?id=274598
> 
> 
> Diffs
> -----
> 
>   /trunk/extragear/office/kmymoney/kmymoney/converter/mymoneyqifreader.cpp 1234356 
> 
> Diff: http://svn.reviewboard.kde.org/r/6694/diff
> 
> 
> Testing
> -------
> 
> Tested with the same files which previously failed, and they now import correctly.
> 
> 
> Thanks,
> 
> Allan
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20110531/0efb758e/attachment-0001.htm 


More information about the KMyMoney-devel mailing list