summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter/mymoneygncreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/converter/mymoneygncreader.cpp')
-rw-r--r--kmymoney2/converter/mymoneygncreader.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kmymoney2/converter/mymoneygncreader.cpp b/kmymoney2/converter/mymoneygncreader.cpp
index 4d2d71d..bfd6911 100644
--- a/kmymoney2/converter/mymoneygncreader.cpp
+++ b/kmymoney2/converter/mymoneygncreader.cpp
@@ -487,7 +487,7 @@ GncAccount::GncAccount () {
m_subElementList = subEls;
m_dataElementListCount = END_Account_DELS;
static const TQString dataEls[] = {"act:id", "act:name", "act:description",
- "act:type", "act:tqparent"};
+ "act:type", "act:parent"};
m_dataElementList = dataEls;
static const unsigned int anonClasses[] = {ASIS, NXTACC, SUPPRESS, ASIS, ASIS};
m_anonClassList = anonClasses;
@@ -958,7 +958,7 @@ bool XmlReader::endElement( const TQString&, const TQString&, const TQString&elN
m_co->resetDataPtr(); // so we don't get extraneous data loaded into the variables
if (elName == m_co->getElName()) { // check if this is the end of the current object
if (pMain->gncdebug) m_co->debugDump(); // dump the object data (temp)
- // call the terminate routine, pop the stack, and advise the tqparent that it's done
+ // call the terminate routine, pop the stack, and advise the parent that it's done
m_co->terminate();
GncObject *temp = m_co;
m_os.pop();
@@ -1201,8 +1201,8 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
m_currencyCount[gac->commodity()->id()]++;
}
- acc.setParentAccountId (gac->tqparent().utf8());
- // now determine the account type and its tqparent id
+ acc.setParentAccountId (gac->parent().utf8());
+ // now determine the account type and its parent id
/* This list taken from
# Feb 2006: A RELAX NG Compact schema for gnucash "v2" XML files.
# Copyright (C) 2006 Joshua Sled <jsled@asynchronous.org>
@@ -1251,7 +1251,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
i18n("Current importer does not recognize GnuCash account type %1").tqarg(gac->type());
throw new MYMONEYEXCEPTION (em);
}
- // if no tqparent account is present, assign to one of our standard accounts
+ // if no parent account is present, assign to one of our standard accounts
if ((acc.parentAccountId().isEmpty()) || (acc.parentAccountId() == m_rootId)) {
switch (acc.accountGroup()) {
case MyMoneyAccount::Asset: acc.setParentAccountId (m_storage->asset().id()); break;
@@ -1310,7 +1310,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
m_storage->addAccount(acc);
m_mapIds[gac->id().utf8()] = acc.id(); // to link gnucash id to ours for tx posting
- if (gncdebug) qDebug("Gnucash account %s has id of %s, type of %s, tqparent is %s",
+ if (gncdebug) qDebug("Gnucash account %s has id of %s, type of %s, parent is %s",
gac->id().latin1(), acc.id().data(),
KMyMoneyUtils::accountTypeToString(acc.accountType()).latin1(), acc.parentAccountId().data());
@@ -1906,7 +1906,7 @@ void MyMoneyGncReader::terminate () {
for (stocks = m_stockList.begin(); stocks != m_stockList.end(); ++stocks) {
checkInvestmentOption (*stocks);
}
- // Next step is to walk the list and assign the tqparent/child relationship between the objects.
+ // Next step is to walk the list and assign the parent/child relationship between the objects.
unsigned int i = 0;
signalProgress (0, m_accountCount, i18n ("Reorganizing accounts..."));
TQValueList<MyMoneyAccount> list;
@@ -1936,17 +1936,17 @@ void MyMoneyGncReader::terminate () {
} 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
+ // it is not under one of the main accounts, so find gnucash parent
TQString parentKey = (*acc).parentAccountId();
- if (gncdebug) qDebug ("acc %s, tqparent %s", (*acc).id().data(),
+ if (gncdebug) qDebug ("acc %s, parent %s", (*acc).id().data(),
(*acc).parentAccountId().data());
map_accountIds::Iterator id = m_mapIds.find(parentKey);
if (id != m_mapIds.end()) {
- if (gncdebug) qDebug("Setting account id %s's tqparent account id to %s",
+ if (gncdebug) qDebug("Setting account id %s's parent account id to %s",
(*acc).id().data(), id.data().data());
- MyMoneyAccount tqparent = m_storage->account(id.data());
- tqparent = checkConsistency (tqparent, (*acc));
- m_storage->addAccount (tqparent, (*acc));
+ MyMoneyAccount parent = m_storage->account(id.data());
+ parent = checkConsistency (parent, (*acc));
+ m_storage->addAccount (parent, (*acc));
} else {
throw new MYMONEYEXCEPTION ("terminate() could not find account id");
}
@@ -2173,40 +2173,40 @@ TQDate MyMoneyGncReader::incrDate (TQDate lastDate, unsigned char interval, unsi
PASS
}
//********************************* checkConsistency **********************************
-MyMoneyAccount MyMoneyGncReader::checkConsistency (MyMoneyAccount& tqparent, MyMoneyAccount& child) {
+MyMoneyAccount MyMoneyGncReader::checkConsistency (MyMoneyAccount& parent, MyMoneyAccount& child) {
TRY
// gnucash is flexible/weird enough to allow various inconsistencies
// these are a couple I found in my file, no doubt more will be discovered
if ((child.accountType() == MyMoneyAccount::Investment) &&
- (tqparent.accountType() != MyMoneyAccount::Asset)) {
+ (parent.accountType() != MyMoneyAccount::Asset)) {
postMessage ("CC", 1, child.name().latin1());
return m_storage->asset();
}
if ((child.accountType() == MyMoneyAccount::Income) &&
- (tqparent.accountType() != MyMoneyAccount::Income)) {
+ (parent.accountType() != MyMoneyAccount::Income)) {
postMessage ("CC", 2, child.name().latin1());
return m_storage->income();
}
if ((child.accountType() == MyMoneyAccount::Expense) &&
- (tqparent.accountType() != MyMoneyAccount::Expense)) {
+ (parent.accountType() != MyMoneyAccount::Expense)) {
postMessage ("CC", 3, child.name().latin1());
return m_storage->expense();
}
- return (tqparent);
+ return (parent);
PASS
}
//*********************************** checkInvestmentOption *************************
void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
// implement the investment option for stock accounts
- // first check whether the tqparent account (gnucash id) is actually an
+ // first check whether the parent account (gnucash id) is actually an
// investment account. if it is, no further action is needed
MyMoneyAccount stockAcc = m_storage->account (m_mapIds[stockId.utf8()]);
- MyMoneyAccount tqparent;
+ MyMoneyAccount parent;
TQString parentKey = stockAcc.parentAccountId();
map_accountIds::Iterator id = m_mapIds.find (parentKey);
if (id != m_mapIds.end()) {
- tqparent = m_storage->account (id.data());
- if (tqparent.accountType() == MyMoneyAccount::Investment) return ;
+ parent = m_storage->account (id.data());
+ if (parent.accountType() == MyMoneyAccount::Investment) return ;
}
// so now, check the investment option requested by the user
// option 0 creates a separate investment account for each stock account
@@ -2214,10 +2214,10 @@ 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 (parentKey); // intersperse it between old tqparent and child stock acct
+ invAcc.setParentAccountId (parentKey); // intersperse it between old parent and child stock acct
m_storage->addAccount (invAcc);
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(),
+ if (gncdebug) qDebug ("Created investment account %s as id %s, parent %s", invAcc.name().data(), invAcc.id().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());
@@ -2240,7 +2240,7 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
singleInvAcc.setParentAccountId (m_storage->asset().id());
m_storage->addAccount (singleInvAcc);
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",
+ if (gncdebug) qDebug ("Created investment account %s as id %s, parent %s, reparenting stock",
singleInvAcc.name().data(), singleInvAcc.id().data(), singleInvAcc.parentAccountId().data());
singleInvAccId = singleInvAcc.id();
} else { // the account has already been created
@@ -2265,9 +2265,9 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
}
//if (accList.isEmpty()) qFatal ("No available accounts");
bool ok = false;
- while (!ok) { // keep going till we have a valid investment tqparent
+ while (!ok) { // keep going till we have a valid investment parent
TQString invAccName = TQInputDialog::getItem (
- PACKAGE, i18n("Select tqparent investment account or enter new name. Stock %1").tqarg(stockAcc.name ()),
+ PACKAGE, i18n("Select parent investment account or enter new name. Stock %1").tqarg(stockAcc.name ()),
accList, lastSelected, true, &ok);
if (ok) {
lastSelected = accList.findIndex (invAccName); // preserve selection for next time