summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter/mymoneytemplate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/converter/mymoneytemplate.cpp')
-rw-r--r--kmymoney2/converter/mymoneytemplate.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kmymoney2/converter/mymoneytemplate.cpp b/kmymoney2/converter/mymoneytemplate.cpp
index 1a8860b..bf70d0a 100644
--- a/kmymoney2/converter/mymoneytemplate.cpp
+++ b/kmymoney2/converter/mymoneytemplate.cpp
@@ -148,14 +148,14 @@ bool MyMoneyTemplate::loadDescription(void)
return validMask == validHeader;
}
-bool MyMoneyTemplate::hierarchy(TQMap<TQString, TQListViewItem*>& list, const TQString& tqparent, TQDomNode account)
+bool MyMoneyTemplate::hierarchy(TQMap<TQString, TQListViewItem*>& list, const TQString& parent, TQDomNode account)
{
bool rc = true;
while(rc == true && !account.isNull()) {
if(account.isElement()) {
TQDomElement accountElement = account.toElement();
if(accountElement.tagName() == "account") {
- TQString name = TQString("%1:%2").tqarg(tqparent).tqarg(accountElement.attribute("name"));
+ TQString name = TQString("%1:%2").tqarg(parent).tqarg(accountElement.attribute("name"));
list[name] = 0;
hierarchy(list, name, account.firstChild());
}
@@ -219,22 +219,22 @@ bool MyMoneyTemplate::importTemplate(void(*callback)(int, int, const TQString&))
if(childElement.tagName() == "account"
&& childElement.attribute("name") == "") {
++m_accountsRead;
- MyMoneyAccount tqparent;
+ MyMoneyAccount parent;
switch(childElement.attribute("type").toUInt()) {
case MyMoneyAccount::Asset:
- tqparent = file->asset();
+ parent = file->asset();
break;
case MyMoneyAccount::Liability:
- tqparent = file->liability();
+ parent = file->liability();
break;
case MyMoneyAccount::Income:
- tqparent = file->income();
+ parent = file->income();
break;
case MyMoneyAccount::Expense:
- tqparent = file->expense();
+ parent = file->expense();
break;
case MyMoneyAccount::Equity:
- tqparent = file->equity();
+ parent = file->equity();
break;
default:
@@ -243,7 +243,7 @@ bool MyMoneyTemplate::importTemplate(void(*callback)(int, int, const TQString&))
}
if(rc == true) {
- rc = createAccounts(tqparent, childElement.firstChild());
+ rc = createAccounts(parent, childElement.firstChild());
}
} else {
rc = false;
@@ -254,7 +254,7 @@ bool MyMoneyTemplate::importTemplate(void(*callback)(int, int, const TQString&))
return rc;
}
-bool MyMoneyTemplate::createAccounts(MyMoneyAccount& tqparent, TQDomNode account)
+bool MyMoneyTemplate::createAccounts(MyMoneyAccount& parent, TQDomNode account)
{
bool rc = true;
while(rc == true && !account.isNull()) {
@@ -266,8 +266,8 @@ bool MyMoneyTemplate::createAccounts(MyMoneyAccount& tqparent, TQDomNode account
TQValueList<MyMoneyAccount> subAccountList;
TQValueList<MyMoneyAccount>::ConstIterator it;
it = subAccountList.end();
- if(!tqparent.accountList().isEmpty()) {
- MyMoneyFile::instance()->accountList(subAccountList, tqparent.accountList());
+ if(!parent.accountList().isEmpty()) {
+ MyMoneyFile::instance()->accountList(subAccountList, parent.accountList());
for(it = subAccountList.begin(); it != subAccountList.end(); ++it) {
if((*it).name() == accountElement.attribute("name")) {
acc = *it;
@@ -281,7 +281,7 @@ bool MyMoneyTemplate::createAccounts(MyMoneyAccount& tqparent, TQDomNode account
acc.setAccountType(static_cast<MyMoneyAccount::_accountTypeE>(accountElement.attribute("type").toUInt()));
setFlags(acc, account.firstChild());
try {
- MyMoneyFile::instance()->addAccount(acc, tqparent);
+ MyMoneyFile::instance()->addAccount(acc, parent);
} catch(MyMoneyException *e) {
delete e;
}
@@ -355,10 +355,10 @@ bool MyMoneyTemplate::exportTemplate(void(*callback)(int, int, const TQString&))
return true;
}
-bool MyMoneyTemplate::addAccountStructure(TQDomElement& tqparent, const MyMoneyAccount& acc)
+bool MyMoneyTemplate::addAccountStructure(TQDomElement& parent, const MyMoneyAccount& acc)
{
TQDomElement account = m_doc.createElement("account");
- tqparent.appendChild(account);
+ parent.appendChild(account);
if(MyMoneyFile::instance()->isStandardAccount(acc.id()))
account.setAttribute(TQString("name"), TQString());