diff options
Diffstat (limited to 'kmymoney2/mymoney/mymoneyfiletest.cpp')
-rw-r--r-- | kmymoney2/mymoney/mymoneyfiletest.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/kmymoney2/mymoney/mymoneyfiletest.cpp b/kmymoney2/mymoney/mymoneyfiletest.cpp index 4d10c56..431debb 100644 --- a/kmymoney2/mymoney/mymoneyfiletest.cpp +++ b/kmymoney2/mymoney/mymoneyfiletest.cpp @@ -380,8 +380,8 @@ void MyMoneyFileTest::testAddAccounts() { MyMoneyFileTransaction ft; try { - MyMoneyAccount tqparent = m->asset(); - m->addAccount(a, tqparent); + MyMoneyAccount parent = m->asset(); + m->addAccount(a, parent); ft.commit(); CPPUNIT_ASSERT(m->accountCount() == 6); CPPUNIT_ASSERT(a.parentAccountId() == "AStd::Asset"); @@ -403,8 +403,8 @@ void MyMoneyFileTest::testAddAccounts() { // try to add this account again, should not work ft.restart(); try { - MyMoneyAccount tqparent = m->asset(); - m->addAccount(a, tqparent); + MyMoneyAccount parent = m->asset(); + m->addAccount(a, parent); CPPUNIT_FAIL("Expecting exception!"); } catch(MyMoneyException *e) { ft.commit(); @@ -434,8 +434,8 @@ void MyMoneyFileTest::testAddAccounts() { b.setInstitutionId(institution.id()); ft.restart(); try { - MyMoneyAccount tqparent = m->asset(); - m->addAccount(b, tqparent); + MyMoneyAccount parent = m->asset(); + m->addAccount(b, parent); ft.commit(); CPPUNIT_ASSERT(m->dirty() == true); CPPUNIT_ASSERT(b.id() == "A000002"); @@ -646,7 +646,7 @@ void MyMoneyFileTest::testRemoveAccountTree() { delete e; } - // make sure that tqchildren are re-parented to tqparent account + // make sure that tqchildren are re-parented to parent account try { a = m->account("A000001"); CPPUNIT_ASSERT(a.parentAccountId() == m->asset().id()); @@ -690,9 +690,9 @@ void MyMoneyFileTest::testAddTransaction () { MyMoneyFileTransaction ft; try { - MyMoneyAccount tqparent = m->expense(); - m->addAccount(exp1, tqparent); - m->addAccount(exp2, tqparent); + MyMoneyAccount parent = m->expense(); + m->addAccount(exp1, parent); + m->addAccount(exp2, parent); ft.commit(); } catch(MyMoneyException *e) { delete e; @@ -1281,8 +1281,8 @@ void MyMoneyFileTest::testAddEquityAccount() { MyMoneyFileTransaction ft; try { - MyMoneyAccount tqparent = m->asset(); - m->addAccount(i, tqparent); + MyMoneyAccount parent = m->asset(); + m->addAccount(i, parent); ft.commit(); } catch(MyMoneyException *e) { unexpectedException(e); @@ -1337,7 +1337,7 @@ void MyMoneyFileTest::testAddEquityAccount() { void MyMoneyFileTest::testReparentEquity() { testAddEquityAccount(); testAddEquityAccount(); - MyMoneyAccount tqparent; + MyMoneyAccount parent; // check the bad cases TQValueList<MyMoneyAccount::accountTypeE> list; @@ -1349,25 +1349,25 @@ void MyMoneyFileTest::testReparentEquity() { list << MyMoneyAccount::Asset; list << MyMoneyAccount::AssetLoan; list << MyMoneyAccount::Currency; - tqparent = m->asset(); - testReparentEquity(list, tqparent); + parent = m->asset(); + testReparentEquity(list, parent); list.clear(); list << MyMoneyAccount::CreditCard; list << MyMoneyAccount::Loan; list << MyMoneyAccount::Liability; - tqparent = m->liability(); - testReparentEquity(list, tqparent); + parent = m->liability(); + testReparentEquity(list, parent); list.clear(); list << MyMoneyAccount::Income; - tqparent = m->income(); - testReparentEquity(list, tqparent); + parent = m->income(); + testReparentEquity(list, parent); list.clear(); list << MyMoneyAccount::Expense; - tqparent = m->expense(); - testReparentEquity(list, tqparent); + parent = m->expense(); + testReparentEquity(list, parent); // now check the good case MyMoneyAccount stock = m->account("A000002"); @@ -1381,7 +1381,7 @@ void MyMoneyFileTest::testReparentEquity() { } } -void MyMoneyFileTest::testReparentEquity(TQValueList<MyMoneyAccount::accountTypeE>& list, MyMoneyAccount& tqparent) +void MyMoneyFileTest::testReparentEquity(TQValueList<MyMoneyAccount::accountTypeE>& list, MyMoneyAccount& parent) { MyMoneyAccount a; MyMoneyAccount stock = m->account("A000002"); @@ -1392,7 +1392,7 @@ void MyMoneyFileTest::testReparentEquity(TQValueList<MyMoneyAccount::accountType a.setName(TQString("Testaccount %1").tqarg(*it)); a.setAccountType(*it); try { - m->addAccount(a, tqparent); + m->addAccount(a, parent); char msg[100]; m->reparentAccount(stock, a); sprintf(msg, "Can reparent stock to non-investment type %d account", *it); |