summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit902ba103f2215bcefa22d62b1c9138aa4b88891c (patch)
tree63ef88424b9be33a31e5a8de61343fb8d7633937 /kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
parent7e51b6d5ddc01fc3bc69f30bc5d3933a7709dbf2 (diff)
downloadkmymoney-902ba103f2215bcefa22d62b1c9138aa4b88891c.tar.gz
kmymoney-902ba103f2215bcefa22d62b1c9138aa4b88891c.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp')
-rw-r--r--kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
index 8bafce8..a80d5af 100644
--- a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
+++ b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
@@ -104,21 +104,21 @@ void MyMoneyDatabaseMgr::addAccount(MyMoneyAccount& account)
}
}
-void MyMoneyDatabaseMgr::addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& account)
+void MyMoneyDatabaseMgr::addAccount(MyMoneyAccount& parent, MyMoneyAccount& account)
{
TQMap<TQString, MyMoneyAccount> accountList;
TQStringList accountIdList;
TQMap<TQString, MyMoneyAccount>::ConstIterator theParent;
TQMap<TQString, MyMoneyAccount>::ConstIterator theChild;
- accountIdList << tqparent.id() << account.id();
+ accountIdList << parent.id() << account.id();
startTransaction();
accountList = m_sql->fetchAccounts(accountIdList, true);
- theParent = accountList.find(tqparent.id());
+ theParent = accountList.find(parent.id());
if(theParent == accountList.end()) {
- TQString msg = "Unknown tqparent account '";
- msg += tqparent.id() + "'";
+ TQString msg = "Unknown parent account '";
+ msg += parent.id() + "'";
throw new MYMONEYEXCEPTION(msg);
}
@@ -131,16 +131,16 @@ void MyMoneyDatabaseMgr::addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& ac
MyMoneyAccount acc = *theParent;
acc.addAccountId(account.id());
- tqparent = acc;
+ parent = acc;
acc = *theChild;
- acc.setParentAccountId(tqparent.id());
+ acc.setParentAccountId(parent.id());
account = acc;
//FIXME: MyMoneyBalanceCacheItem balance;
//FIXME: m_balanceCache[account.id()] = balance;
- m_sql->modifyAccount(tqparent);
+ m_sql->modifyAccount(parent);
m_sql->modifyAccount(account);
commitTransaction();
}
@@ -648,9 +648,9 @@ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction
m_sql->modifyTransaction(transaction);
}
-void MyMoneyDatabaseMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent)
+void MyMoneyDatabaseMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent)
{
- if(account.accountType() == MyMoneyAccount::Stock && tqparent.accountType() != MyMoneyAccount::Investment)
+ if(account.accountType() == MyMoneyAccount::Stock && parent.accountType() != MyMoneyAccount::Investment)
throw new MYMONEYEXCEPTION("Cannot move a stock acocunt into a non-investment account");
TQStringList accountIdList;
@@ -660,9 +660,9 @@ void MyMoneyDatabaseMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount
// verify that accounts exist. If one does not,
// an exception is thrown
- accountIdList << account.id() << tqparent.id();
+ accountIdList << account.id() << parent.id();
MyMoneyDatabaseMgr::account(account.id());
- MyMoneyDatabaseMgr::account(tqparent.id());
+ MyMoneyDatabaseMgr::account(parent.id());
if(!account.parentAccountId().isEmpty()) {
accountIdList << account.parentAccountId();
@@ -676,7 +676,7 @@ void MyMoneyDatabaseMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount
oldParent = accountList.find(account.parentAccountId());
}
- newParent = accountList.find(tqparent.id());
+ newParent = accountList.find(parent.id());
childAccount = accountList.find(account.id());
MyMoneyAccount acc;
@@ -686,13 +686,13 @@ void MyMoneyDatabaseMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount
m_sql->modifyAccount(acc);
}
- tqparent = (*newParent);
- tqparent.addAccountId(account.id());
+ parent = (*newParent);
+ parent.addAccountId(account.id());
account = (*childAccount);
- account.setParentAccountId(tqparent.id());
+ account.setParentAccountId(parent.id());
- m_sql->modifyAccount(tqparent);
+ m_sql->modifyAccount(parent);
m_sql->modifyAccount(account);
commitTransaction();
}
@@ -787,12 +787,12 @@ void MyMoneyDatabaseMgr::transactionList(TQValueList<TQPair<MyMoneyTransaction,
void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account)
{
- MyMoneyAccount tqparent;
+ MyMoneyAccount parent;
- // check that the account and it's tqparent exist
+ // check that the account and it's parent exist
// this will throw an exception if the id is unknown
MyMoneyDatabaseMgr::account(account.id());
- tqparent = MyMoneyDatabaseMgr::account(account.parentAccountId());
+ parent = MyMoneyDatabaseMgr::account(account.parentAccountId());
// check that it's not one of the standard account groups
if(isStandardAccount(account.id()))
@@ -802,7 +802,7 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account)
throw new MYMONEYEXCEPTION("Unable to remove account with active splits");
}
- // re-tqparent all sub-ordinate accounts to the tqparent of the account
+ // re-parent all sub-ordinate accounts to the parent of the account
// to be deleted. First round check that all accounts exist, second
// round do the re-parenting.
TQStringList::ConstIterator it;
@@ -814,7 +814,7 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account)
// thrown and we would not make it until here.
TQStringList accountIdList;
- accountIdList << tqparent.id() << account.id();
+ accountIdList << parent.id() << account.id();
startTransaction();
TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(accountIdList, true);
@@ -827,9 +827,9 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account)
if(it_a == accountList.end())
throw new MYMONEYEXCEPTION("Internal error: account not found in list");
- it_p = accountList.find(tqparent.id());
+ it_p = accountList.find(parent.id());
if(it_p == accountList.end())
- throw new MYMONEYEXCEPTION("Internal error: tqparent account not found in list");
+ throw new MYMONEYEXCEPTION("Internal error: parent account not found in list");
if(!account.institutionId().isEmpty())
throw new MYMONEYEXCEPTION("Cannot remove account still attached to an institution");
@@ -848,19 +848,19 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account)
if((*it_a).accountList().count() > 0) {
for(it = (*it_a).accountList().begin(); it != (*it_a).accountList().end(); ++it) {
MyMoneyAccount acc(MyMoneyDatabaseMgr::account(*it));
- reparentAccount(acc, tqparent);//, false);
+ reparentAccount(acc, parent);//, false);
}
}
- // remove account from tqparent's list
- tqparent.removeAccountId(account.id());
- m_sql->modifyAccount(tqparent);
+ // remove account from parent's list
+ parent.removeAccountId(account.id());
+ m_sql->modifyAccount(parent);
// remove account from the global account pool
//m_accountList.remove(account.id());
// remove from balance list
//FIXME: m_balanceCache.remove(account.id());
-//FIXME: invalidateBalanceCache(tqparent.id());
+//FIXME: invalidateBalanceCache(parent.id());
m_sql->removeAccount(account);
}