From 902ba103f2215bcefa22d62b1c9138aa4b88891c Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 22:19:39 +0000 Subject: 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 --- kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp | 56 +++++++++++------------ 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp') diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp index efc88b7..ef4c3a9 100644 --- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp +++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp @@ -248,15 +248,15 @@ const TQValueList MyMoneySeqAccessMgr::payeeList(void) const } -void MyMoneySeqAccessMgr::addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& account) +void MyMoneySeqAccessMgr::addAccount(MyMoneyAccount& parent, MyMoneyAccount& account) { TQMap::ConstIterator theParent; TQMap::ConstIterator theChild; - theParent = m_accountList.find(tqparent.id()); + theParent = m_accountList.find(parent.id()); if(theParent == m_accountList.end()) { - TQString msg = "Unknown tqparent account '"; - msg += tqparent.id() + "'"; + TQString msg = "Unknown parent account '"; + msg += parent.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -270,10 +270,10 @@ void MyMoneySeqAccessMgr::addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& a MyMoneyAccount acc = *theParent; acc.addAccountId(account.id()); m_accountList.modify(acc.id(), acc); - tqparent = acc; + parent = acc; acc = *theChild; - acc.setParentAccountId(tqparent.id()); + acc.setParentAccountId(parent.id()); m_accountList.modify(acc.id(), acc); account = acc; @@ -591,12 +591,12 @@ void MyMoneySeqAccessMgr::modifyTransaction(const MyMoneyTransaction& transactio m_transactionKeys.modify(transaction.id(), newKey); } -void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent) +void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent) { - reparentAccount(account, tqparent, true); + reparentAccount(account, parent, true); } -void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent, const bool /* sendNotification */) +void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent, const bool /* sendNotification */) { TQMap::ConstIterator oldParent; TQMap::ConstIterator newParent; @@ -605,16 +605,16 @@ void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccoun // verify that accounts exist. If one does not, // an exception is thrown MyMoneySeqAccessMgr::account(account.id()); - MyMoneySeqAccessMgr::account(tqparent.id()); + MyMoneySeqAccessMgr::account(parent.id()); if(!account.parentAccountId().isEmpty()) { MyMoneySeqAccessMgr::account(account.parentAccountId()); oldParent = m_accountList.find(account.parentAccountId()); } - 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"); - newParent = m_accountList.find(tqparent.id()); + newParent = m_accountList.find(parent.id()); childAccount = m_accountList.find(account.id()); MyMoneyAccount acc; @@ -624,16 +624,16 @@ void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccoun m_accountList.modify(acc.id(), acc); } - tqparent = (*newParent); - tqparent.addAccountId(account.id()); - m_accountList.modify(tqparent.id(), tqparent); + parent = (*newParent); + parent.addAccountId(account.id()); + m_accountList.modify(parent.id(), parent); account = (*childAccount); - account.setParentAccountId(tqparent.id()); + account.setParentAccountId(parent.id()); m_accountList.modify(account.id(), account); #if 0 - // make sure the type is the same as the new tqparent. This does not work for stock and investment + // make sure the type is the same as the new parent. This does not work for stock and investment if(account.accountType() != MyMoneyAccount::Stock && account.accountType() != MyMoneyAccount::Investment) (*childAccount).setAccountType((*newParent).accountType()); #endif @@ -677,12 +677,12 @@ void MyMoneySeqAccessMgr::removeTransaction(const MyMoneyTransaction& transactio void MyMoneySeqAccessMgr::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 MyMoneySeqAccessMgr::account(account.id()); - tqparent = MyMoneySeqAccessMgr::account(account.parentAccountId()); + parent = MyMoneySeqAccessMgr::account(account.parentAccountId()); // check that it's not one of the standard account groups if(isStandardAccount(account.id())) @@ -692,7 +692,7 @@ void MyMoneySeqAccessMgr::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; @@ -712,9 +712,9 @@ void MyMoneySeqAccessMgr::removeAccount(const MyMoneyAccount& account) if(it_a == m_accountList.end()) throw new MYMONEYEXCEPTION("Internal error: account not found in list"); - it_p = m_accountList.find(tqparent.id()); + it_p = m_accountList.find(parent.id()); if(it_p == m_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"); @@ -736,19 +736,19 @@ void MyMoneySeqAccessMgr::removeAccount(const MyMoneyAccount& account) while((*it_a).accountList().count() > 0) { it = (*it_a).accountList().begin(); MyMoneyAccount acc(MyMoneySeqAccessMgr::account(*it)); - reparentAccount(acc, tqparent, false); + reparentAccount(acc, parent, false); } } - // remove account from tqparent's list - tqparent.removeAccountId(account.id()); - m_accountList.modify(tqparent.id(), tqparent); + // remove account from parent's list + parent.removeAccountId(account.id()); + m_accountList.modify(parent.id(), parent); // remove account from the global account pool m_accountList.remove(account.id()); // remove from balance list m_balanceCache.remove(account.id()); - invalidateBalanceCache(tqparent.id()); + invalidateBalanceCache(parent.id()); } } -- cgit v1.2.1