diff options
Diffstat (limited to 'kmymoney2/converter/mymoneygncreader.cpp')
-rw-r--r-- | kmymoney2/converter/mymoneygncreader.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kmymoney2/converter/mymoneygncreader.cpp b/kmymoney2/converter/mymoneygncreader.cpp index 79f6e89..10472d2 100644 --- a/kmymoney2/converter/mymoneygncreader.cpp +++ b/kmymoney2/converter/mymoneygncreader.cpp @@ -1252,7 +1252,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) { throw new MYMONEYEXCEPTION (em); } // if no tqparent account is present, assign to one of our standard accounts - if ((acc.tqparentAccountId().isEmpty()) || (acc.tqparentAccountId() == m_rootId)) { + if ((acc.parentAccountId().isEmpty()) || (acc.parentAccountId() == m_rootId)) { switch (acc.accountGroup()) { case MyMoneyAccount::Asset: acc.setParentAccountId (m_storage->asset().id()); break; case MyMoneyAccount::Liability: acc.setParentAccountId (m_storage->liability().id()); break; @@ -1312,7 +1312,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) { if (gncdebug) qDebug("Gnucash account %s has id of %s, type of %s, tqparent is %s", gac->id().latin1(), acc.id().data(), - KMyMoneyUtils::accountTypeToString(acc.accountType()).latin1(), acc.tqparentAccountId().data()); + KMyMoneyUtils::accountTypeToString(acc.accountType()).latin1(), acc.parentAccountId().data()); signalProgress (++m_accountCount, 0); return ; @@ -1913,34 +1913,34 @@ void MyMoneyGncReader::terminate () { TQValueList<MyMoneyAccount>::Iterator acc; m_storage->accountList(list); for (acc = list.begin(); acc != list.end(); ++acc) { - if ((*acc).tqparentAccountId() == m_storage->asset().id()) { + if ((*acc).parentAccountId() == m_storage->asset().id()) { MyMoneyAccount assets = m_storage->asset(); m_storage->addAccount(assets, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main asset account", (*acc).id().data()); - } else if ((*acc).tqparentAccountId() == m_storage->liability().id()) { + } else if ((*acc).parentAccountId() == m_storage->liability().id()) { MyMoneyAccount liabilities = m_storage->liability(); m_storage->addAccount(liabilities, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main liability account", (*acc).id().data()); - } else if ((*acc).tqparentAccountId() == m_storage->income().id()) { + } else if ((*acc).parentAccountId() == m_storage->income().id()) { MyMoneyAccount incomes = m_storage->income(); m_storage->addAccount(incomes, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main income account", (*acc).id().data()); - } else if ((*acc).tqparentAccountId() == m_storage->expense().id()) { + } else if ((*acc).parentAccountId() == m_storage->expense().id()) { MyMoneyAccount expenses = m_storage->expense(); m_storage->addAccount(expenses, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main expense account", (*acc).id().data()); - } else if ((*acc).tqparentAccountId() == m_storage->equity().id()) { + } else if ((*acc).parentAccountId() == m_storage->equity().id()) { MyMoneyAccount equity = m_storage->equity(); m_storage->addAccount(equity, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main equity account", (*acc).id().data()); - } else if ((*acc).tqparentAccountId() == m_rootId) { + } else if ((*acc).parentAccountId() == m_rootId) { if (gncdebug) qDebug("Account id %s is a child of root", (*acc).id().data()); } else { // it is not under one of the main accounts, so find gnucash tqparent - TQString tqparentKey = (*acc).tqparentAccountId(); + TQString parentKey = (*acc).parentAccountId(); if (gncdebug) qDebug ("acc %s, tqparent %s", (*acc).id().data(), - (*acc).tqparentAccountId().data()); - map_accountIds::Iterator id = m_mapIds.tqfind(tqparentKey); + (*acc).parentAccountId().data()); + map_accountIds::Iterator id = m_mapIds.tqfind(parentKey); if (id != m_mapIds.end()) { if (gncdebug) qDebug("Setting account id %s's tqparent account id to %s", (*acc).id().data(), id.data().data()); @@ -2202,8 +2202,8 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) { // investment account. if it is, no further action is needed MyMoneyAccount stockAcc = m_storage->account (m_mapIds[stockId.utf8()]); MyMoneyAccount tqparent; - TQString tqparentKey = stockAcc.tqparentAccountId(); - map_accountIds::Iterator id = m_mapIds.tqfind (tqparentKey); + TQString parentKey = stockAcc.parentAccountId(); + map_accountIds::Iterator id = m_mapIds.tqfind (parentKey); if (id != m_mapIds.end()) { tqparent = m_storage->account (id.data()); if (tqparent.accountType() == MyMoneyAccount::Investment) return ; @@ -2214,11 +2214,11 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) { MyMoneyAccount invAcc (stockAcc); invAcc.setAccountType (MyMoneyAccount::Investment); invAcc.setCurrencyId (TQString("")); // we don't know what currency it is!! - invAcc.setParentAccountId (tqparentKey); // intersperse it between old tqparent and child stock acct + invAcc.setParentAccountId (parentKey); // intersperse it between old tqparent and child stock acct m_storage->addAccount (invAcc); - m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets tqparented (again) to investment account later + m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets parented (again) to investment account later if (gncdebug) qDebug ("Created investment account %s as id %s, tqparent %s", invAcc.name().data(), invAcc.id().data(), - invAcc.tqparentAccountId().data()); + invAcc.parentAccountId().data()); if (gncdebug) qDebug ("Setting stock %s, id %s, as child of %s", stockAcc.name().data(), stockAcc.id().data(), invAcc.id().data()); stockAcc.setParentAccountId (invAcc.id()); m_storage->addAccount(invAcc, stockAcc); @@ -2239,9 +2239,9 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) { singleInvAcc.setCurrencyId (TQString("")); singleInvAcc.setParentAccountId (m_storage->asset().id()); m_storage->addAccount (singleInvAcc); - m_mapIds [singleInvAcc.id()] = singleInvAcc.id(); // so stock account gets tqparented (again) to investment account later + m_mapIds [singleInvAcc.id()] = singleInvAcc.id(); // so stock account gets parented (again) to investment account later if (gncdebug) qDebug ("Created investment account %s as id %s, tqparent %s, reparenting stock", - singleInvAcc.name().data(), singleInvAcc.id().data(), singleInvAcc.tqparentAccountId().data()); + singleInvAcc.name().data(), singleInvAcc.id().data(), singleInvAcc.parentAccountId().data()); singleInvAccId = singleInvAcc.id(); } else { // the account has already been created singleInvAcc = m_storage->account (singleInvAccId); @@ -2318,7 +2318,7 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) { } } // end if ok - user pressed Cancel } // end while !ok - m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets tqparented (again) to investment account later + m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets parented (again) to investment account later m_storage->addAccount(invAcc, stockAcc); } else { // investment option != 0, 1, 2 qFatal ("Invalid investment option %d", m_investmentOption); |