[Kmymoney-devel] [kmymoney4] [Bug 317655] Various glitches with importing QIF from Quicken

allan agander93 at gmail.com
Mon Apr 8 14:24:17 UTC 2013


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

--- Comment #17 from allan <agander93 at gmail.com> ---
I think I have sussed this, but really need a second opinion as this is my
first brush with models.
I'm importing this simple QIF file, taken from the OP's Quicken file.

!Type:Cat
NUtilities:Telephone:Cell
DCell Phone
E
^

The structure is imported correctly, except that the lowest level sub-category
gets duplicated, or so it appears in Categories view.  Elsewhere in KMM, all
looks OK.  Adding a fourth level results in two third level items, the first
having two fourth level subs, and the second having one.

What I think is happening is that, when the 'N' line is processed, the whole
structure is created, including all sub-categories.  Then, when the second
level item is created, a further copy of its sub-category gets created.

I've traced this to accountsmodel.cpp, line74-76.

if (acc.accountList().count() > 0) {qDebug()<<"74
AccountsModel:loadSubAccounts"<<acc.accountList();
        loadSubAccounts(model, item, favoriteAccountsItem, acc.accountList());
}

I thought at first that manual entry was correct, but that was because I was
creating each level separately.  Creating all three levels in one action
produced the same effect.

There was a further, separate, problem, in that, if the OP's complete QIF file
was re-imported, there was wholesale duplication of categories.  This, I fixed
with -

@@ -906,13 +908,19 @@ void MyMoneyQifReader::processCategoryEntry(void)
   }

   // check if we can find the account already in the file
-  MyMoneyAccount acc = kmymoney->findAccount(account, MyMoneyAccount());
+  MyMoneyAccount acc = kmymoney->findAccount(account, parentAccount);

Hopefully, I'm not overlooking something.

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


More information about the KMyMoney-devel mailing list