summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp')
-rw-r--r--kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp218
1 files changed, 109 insertions, 109 deletions
diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp
index f6a2bba..ae589cd 100644
--- a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp
+++ b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp
@@ -60,7 +60,7 @@ void MyMoneyDatabaseMgrTest::testEmptyConstructor()
CPPUNIT_ASSERT(m->nextReportID() == 0);
CPPUNIT_ASSERT(m->institutionList().count() == 0);
- QValueList<MyMoneyAccount> accList;
+ TQValueList<MyMoneyAccount> accList;
m->accountList(accList);
CPPUNIT_ASSERT(accList.count() == 0);
@@ -70,31 +70,31 @@ void MyMoneyDatabaseMgrTest::testEmptyConstructor()
CPPUNIT_ASSERT(m->payeeList().count() == 0);
CPPUNIT_ASSERT(m->scheduleList().count() == 0);
- CPPUNIT_ASSERT(m->m_creationDate == QDate::currentDate());
+ CPPUNIT_ASSERT(m->m_creationDate == TQDate::tqcurrentDate());
}
void MyMoneyDatabaseMgrTest::testCreateDb() {
m->commitTransaction();
// Fetch the list of available drivers
- QStringList list = QSqlDatabase::drivers();
- QStringList::Iterator it = list.begin();
+ TQStringList list = TQSqlDatabase::drivers();
+ TQStringList::Iterator it = list.begin();
if (it == list.end()) {
m_canOpen = false;
} else {
struct passwd * pwd = getpwuid(geteuid());
- QString userName;
+ TQString userName;
if (pwd != 0) {
- userName = QString(pwd->pw_name);
+ userName = TQString(pwd->pw_name);
}
- //"QMYSQL3"
- //"QPSQL7"
- //"QSQLITE3"
+ //"TQMYSQL3"
+ //"TQPSQL7"
+ //"TQSQLITE3"
m_url = "sql://" + userName + "@localhost/kmm_test_driver?driver="
- //"QPSQL7&mode=single";
- //"QSQLITE3&mode=single";
- //"QMYSQL3&mode=single";
+ //"TQPSQL7&mode=single";
+ //"TQSQLITE3&mode=single";
+ //"TQMYSQL3&mode=single";
+ *it + "&mode=single";
KSharedPtr <MyMoneyStorageSql> sql = m->connectToDatabase(m_url);
CPPUNIT_ASSERT(0 != sql);
@@ -118,8 +118,8 @@ void MyMoneyDatabaseMgrTest::testAttachDb() {
MyMoneyFile::instance()->detachStorage();
KSharedPtr <MyMoneyStorageSql> sql = m->connectToDatabase(m_url);
CPPUNIT_ASSERT(sql);
- int openStatus = sql->open(m_url, IO_ReadWrite);
- CPPUNIT_ASSERT(0 == openStatus);
+ int opentqStatus = sql->open(m_url, IO_ReadWrite);
+ CPPUNIT_ASSERT(0 == opentqStatus);
MyMoneyFile::instance()->attachStorage(m);
m->startTransaction();
m_dbAttached = true;
@@ -202,7 +202,7 @@ void MyMoneyDatabaseMgrTest::testIsStandardAccount()
CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_ASSET) == true);
CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_EXPENSE) == true);
CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_INCOME) == true);
- CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_EQUITY) == true);
+ CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_ETQUITY) == true);
CPPUNIT_ASSERT(m->isStandardAccount("A0002") == false);
}
@@ -221,7 +221,7 @@ void MyMoneyDatabaseMgrTest::testNewAccount() {
m->addAccount(a);
CPPUNIT_ASSERT(m->accountId() == 1);
- QValueList<MyMoneyAccount> accList;
+ TQValueList<MyMoneyAccount> accList;
m->accountList(accList);
CPPUNIT_ASSERT(accList.count() == 1);
CPPUNIT_ASSERT((*(accList.begin())).name() == "AccountName");
@@ -274,7 +274,7 @@ void MyMoneyDatabaseMgrTest::testAddNewAccount() {
m->setDirty();
CPPUNIT_ASSERT(m->accountId() == 2);
- QValueList<MyMoneyAccount> accList;
+ TQValueList<MyMoneyAccount> accList;
m->accountList(accList);
CPPUNIT_ASSERT(accList.count() == 2);
@@ -421,7 +421,7 @@ void MyMoneyDatabaseMgrTest::testModifyAccount() {
try {
m->modifyAccount(a);
MyMoneyAccount b = m->account("A000001");
- CPPUNIT_ASSERT(b.parentAccountId() == a.parentAccountId());
+ CPPUNIT_ASSERT(b.tqparentAccountId() == a.tqparentAccountId());
CPPUNIT_ASSERT(b.name() == "New account name");
} catch (MyMoneyException *e) {
delete e;
@@ -449,7 +449,7 @@ void MyMoneyDatabaseMgrTest::testModifyAccount() {
delete e;
}
- // use different parent
+ // use different tqparent
a.setParentAccountId("A000002");
try {
m->modifyAccount(c);
@@ -490,7 +490,7 @@ void MyMoneyDatabaseMgrTest::testModifyInstitution() {
}
}
-void MyMoneyDatabaseMgrTest::testReparentAccount() {
+void MyMoneyDatabaseMgrTest::testRetqparentAccount() {
testAttachDb();
if (!m_canOpen) {
@@ -535,23 +535,23 @@ void MyMoneyDatabaseMgrTest::testReparentAccount() {
CPPUNIT_ASSERT(in.id() == "A000005");
CPPUNIT_ASSERT(ch.id() == "A000006");
- MyMoneyAccount parent = m->expense();
+ MyMoneyAccount tqparent = m->expense();
- m->addAccount(parent, ex1);
+ m->addAccount(tqparent, ex1);
m->addAccount(ex1, ex2);
- m->addAccount(parent, ex3);
- m->addAccount(parent, ex4);
+ m->addAccount(tqparent, ex3);
+ m->addAccount(tqparent, ex4);
- parent = m->income();
- m->addAccount(parent, in);
+ tqparent = m->income();
+ m->addAccount(tqparent, in);
- parent = m->asset();
- m->addAccount(parent, ch);
+ tqparent = m->asset();
+ m->addAccount(tqparent, ch);
MyMoneyFile::instance()->preloadCache();
CPPUNIT_ASSERT(m->expense().accountCount() == 3);
CPPUNIT_ASSERT(m->account(ex1.id()).accountCount() == 1);
- CPPUNIT_ASSERT(ex3.parentAccountId() == STD_ACC_EXPENSE);
+ CPPUNIT_ASSERT(ex3.tqparentAccountId() == STD_ACC_EXPENSE);
//for (int i = 0; i < 100; ++i) {
m->reparentAccount(ex3, ex1);
@@ -559,7 +559,7 @@ void MyMoneyDatabaseMgrTest::testReparentAccount() {
MyMoneyFile::instance()->preloadCache();
CPPUNIT_ASSERT(m->expense().accountCount() == 2);
CPPUNIT_ASSERT(m->account(ex1.id()).accountCount() == 2);
- CPPUNIT_ASSERT(ex3.parentAccountId() == ex1.id());
+ CPPUNIT_ASSERT(ex3.tqparentAccountId() == ex1.id());
} catch (MyMoneyException *e) {
std::cout << std::endl << e->what() << std::endl;
delete e;
@@ -575,7 +575,7 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() {
return;
}
- testReparentAccount();
+ testRetqparentAccount();
MyMoneyAccount ch;
MyMoneyTransaction t1, t2;
@@ -589,14 +589,14 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() {
CPPUNIT_ASSERT(s.id().isEmpty());
t1.addSplit(s);
- s.setId(QString()); // enable re-usage of split variable
+ s.setId(TQString()); // enable re-usage of split variable
s.setAccountId("A000005"); // Salary
s.setShares(-100000);
s.setValue(-100000);
CPPUNIT_ASSERT(s.id().isEmpty());
t1.addSplit(s);
- t1.setPostDate(QDate(2002,5,10));
+ t1.setPostDate(TQDate(2002,5,10));
} catch (MyMoneyException *e) {
unexpectedException(e);
}
@@ -613,35 +613,35 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() {
try {
// I spent some money, not so great
- s.setId(QString()); // enable re-usage of split variable
+ s.setId(TQString()); // enable re-usage of split variable
s.setAccountId("A000004"); // Grosseries
s.setShares(10000);
s.setValue(10000);
CPPUNIT_ASSERT(s.id().isEmpty());
t2.addSplit(s);
- s.setId(QString()); // enable re-usage of split variable
+ s.setId(TQString()); // enable re-usage of split variable
s.setAccountId("A000002"); // 16% sales tax
s.setShares(1200);
s.setValue(1200);
CPPUNIT_ASSERT(s.id().isEmpty());
t2.addSplit(s);
- s.setId(QString()); // enable re-usage of split variable
+ s.setId(TQString()); // enable re-usage of split variable
s.setAccountId("A000003"); // 7% sales tax
s.setShares(400);
s.setValue(400);
CPPUNIT_ASSERT(s.id().isEmpty());
t2.addSplit(s);
- s.setId(QString()); // enable re-usage of split variable
+ s.setId(TQString()); // enable re-usage of split variable
s.setAccountId("A000006"); // Checkings account
s.setShares(-11600);
s.setValue(-11600);
CPPUNIT_ASSERT(s.id().isEmpty());
t2.addSplit(s);
- t2.setPostDate(QDate(2002,5,9));
+ t2.setPostDate(TQDate(2002,5,9));
} catch (MyMoneyException *e) {
unexpectedException(e);
}
@@ -652,10 +652,10 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() {
CPPUNIT_ASSERT(t2.splitCount() == 4);
CPPUNIT_ASSERT(m->transactionCount() == 2);
- //QMap<QString, QString>::ConstIterator it_k;
+ //TQMap<TQString, TQString>::ConstIterator it_k;
MyMoneyTransactionFilter f;
- QValueList<MyMoneyTransaction> transactionList (m->transactionList(f));
- QValueList<MyMoneyTransaction>::ConstIterator it_t (transactionList.begin());
+ TQValueList<MyMoneyTransaction> transactionList (m->transactionList(f));
+ TQValueList<MyMoneyTransaction>::ConstIterator it_t (transactionList.begin());
//CPPUNIT_ASSERT((*it_k) == "2002-05-10-T000000000000000001");
CPPUNIT_ASSERT((*it_t).id() == "T000000000000000002");
@@ -671,12 +671,12 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() {
ch = m->account("A000006");
// check that the account's transaction list is updated
- QValueList<MyMoneyTransaction> list;
+ TQValueList<MyMoneyTransaction> list;
MyMoneyTransactionFilter filter("A000006");
list = m->transactionList(filter);
CPPUNIT_ASSERT(list.size() == 2);
- QValueList<MyMoneyTransaction>::ConstIterator it;
+ TQValueList<MyMoneyTransaction>::ConstIterator it;
it = list.begin();
CPPUNIT_ASSERT((*it).id() == "T000000000000000002");
++it;
@@ -717,7 +717,7 @@ void MyMoneyDatabaseMgrTest::testAddBudget() {
MyMoneyBudget budget;
budget.setName("TestBudget");
- budget.setBudgetStart(QDate::currentDate(Qt::LocalTime));
+ budget.setBudgetStart(TQDate::tqcurrentDate(TQt::LocalTime));
m->addBudget(budget);
@@ -742,7 +742,7 @@ void MyMoneyDatabaseMgrTest::testCopyBudget() {
MyMoneyBudget newBudget = oldBudget;
newBudget.clearId();
- newBudget.setName(QString("Copy of %1").arg(oldBudget.name()));
+ newBudget.setName(TQString("Copy of %1").tqarg(oldBudget.name()));
m->addBudget(newBudget);
CPPUNIT_ASSERT(m->budgetList().count() == 2);
@@ -757,7 +757,7 @@ void MyMoneyDatabaseMgrTest::testCopyBudget() {
CPPUNIT_ASSERT(testBudget.budgetStart() == newBudget.budgetStart());
CPPUNIT_ASSERT(testBudget.name() == newBudget.name());
- } catch (QString& s) {
+ } catch (TQString& s) {
std::cout << "Error in testCopyBudget(): " << s << std::endl;
CPPUNIT_ASSERT(false);
}
@@ -773,7 +773,7 @@ void MyMoneyDatabaseMgrTest::testModifyBudget() {
MyMoneyBudget budget = m->budgetByName("TestBudget");
- budget.setBudgetStart(QDate::currentDate(Qt::LocalTime).addDays(-1));
+ budget.setBudgetStart(TQDate::tqcurrentDate(TQt::LocalTime).addDays(-1));
m->modifyBudget(budget);
@@ -815,9 +815,9 @@ void MyMoneyDatabaseMgrTest::testBalance() {
testAddTransactions();
- CPPUNIT_ASSERT(m->balance("A000001", QDate()).isZero());
- CPPUNIT_ASSERT(m->balance("A000002", QDate()) == MyMoneyMoney(1200));
- CPPUNIT_ASSERT(m->balance("A000003", QDate()) == MyMoneyMoney(400));
+ CPPUNIT_ASSERT(m->balance("A000001", TQDate()).isZero());
+ CPPUNIT_ASSERT(m->balance("A000002", TQDate()) == MyMoneyMoney(1200));
+ CPPUNIT_ASSERT(m->balance("A000003", TQDate()) == MyMoneyMoney(400));
//Add a transaction to zero account A000003
MyMoneyTransaction t1;
MyMoneySplit s;
@@ -828,31 +828,31 @@ void MyMoneyDatabaseMgrTest::testBalance() {
CPPUNIT_ASSERT(s.id().isEmpty());
t1.addSplit(s);
- s.setId(QString()); // enable re-usage of split variable
+ s.setId(TQString()); // enable re-usage of split variable
s.setAccountId("A000002");
s.setShares(400);
s.setValue(400);
CPPUNIT_ASSERT(s.id().isEmpty());
t1.addSplit(s);
- t1.setPostDate(QDate(2007,5,10));
+ t1.setPostDate(TQDate(2007,5,10));
m->addTransaction(t1);
- //qDebug ("Balance of A000003 is 0 = %s", m->balance("A000003", QDate()).toString().ascii());
- CPPUNIT_ASSERT(m->balance("A000003", QDate()).isZero());
+ //qDebug ("Balance of A000003 is 0 = %s", m->balance("A000003", TQDate()).toString().ascii());
+ CPPUNIT_ASSERT(m->balance("A000003", TQDate()).isZero());
- //qDebug ("Balance of A000001 is 1600 = %s", m->balance("A000001", QDate()).toString().ascii());
- CPPUNIT_ASSERT(m->totalBalance("A000001", QDate()) == MyMoneyMoney(1600));
+ //qDebug ("Balance of A000001 is 1600 = %s", m->balance("A000001", TQDate()).toString().ascii());
+ CPPUNIT_ASSERT(m->totalBalance("A000001", TQDate()) == MyMoneyMoney(1600));
- //qDebug ("Balance of A000006 is -11600 = %s", m->balance("A000006", QDate(2002,5,9)).toString().ascii());
- CPPUNIT_ASSERT(m->balance("A000006", QDate(2002,5,9)) == MyMoneyMoney(-11600));
+ //qDebug ("Balance of A000006 is -11600 = %s", m->balance("A000006", TQDate(2002,5,9)).toString().ascii());
+ CPPUNIT_ASSERT(m->balance("A000006", TQDate(2002,5,9)) == MyMoneyMoney(-11600));
- //qDebug ("Balance of A000005 is -100000 = %s", m->balance("A000005", QDate(2002,5,10)).toString().ascii());
- CPPUNIT_ASSERT(m->balance("A000005", QDate(2002,5,10)) == MyMoneyMoney(-100000));
+ //qDebug ("Balance of A000005 is -100000 = %s", m->balance("A000005", TQDate(2002,5,10)).toString().ascii());
+ CPPUNIT_ASSERT(m->balance("A000005", TQDate(2002,5,10)) == MyMoneyMoney(-100000));
- //qDebug ("Balance of A000006 is 88400 = %s", m->balance("A000006", QDate(2002,5,10)).toString().ascii());
- CPPUNIT_ASSERT(m->balance("A000006", QDate(2002,5,10)) == MyMoneyMoney(88400));
+ //qDebug ("Balance of A000006 is 88400 = %s", m->balance("A000006", TQDate(2002,5,10)).toString().ascii());
+ CPPUNIT_ASSERT(m->balance("A000006", TQDate(2002,5,10)) == MyMoneyMoney(88400));
}
void MyMoneyDatabaseMgrTest::testModifyTransaction() {
@@ -884,30 +884,30 @@ void MyMoneyDatabaseMgrTest::testModifyTransaction() {
t.modifySplit(s);
try {
- CPPUNIT_ASSERT(m->balance("A000004", QDate()) == MyMoneyMoney(10000));
- CPPUNIT_ASSERT(m->balance("A000006", QDate()) == MyMoneyMoney(100000-11600));
- CPPUNIT_ASSERT(m->totalBalance("A000001", QDate()) == MyMoneyMoney(1600));
+ CPPUNIT_ASSERT(m->balance("A000004", TQDate()) == MyMoneyMoney(10000));
+ CPPUNIT_ASSERT(m->balance("A000006", TQDate()) == MyMoneyMoney(100000-11600));
+ CPPUNIT_ASSERT(m->totalBalance("A000001", TQDate()) == MyMoneyMoney(1600));
m->modifyTransaction(t);
- CPPUNIT_ASSERT(m->balance("A000004", QDate()) == MyMoneyMoney(11000));
- CPPUNIT_ASSERT(m->balance("A000006", QDate()) == MyMoneyMoney(100000-12600));
- CPPUNIT_ASSERT(m->totalBalance("A000001", QDate()) == MyMoneyMoney(1600));
+ CPPUNIT_ASSERT(m->balance("A000004", TQDate()) == MyMoneyMoney(11000));
+ CPPUNIT_ASSERT(m->balance("A000006", TQDate()) == MyMoneyMoney(100000-12600));
+ CPPUNIT_ASSERT(m->totalBalance("A000001", TQDate()) == MyMoneyMoney(1600));
} catch (MyMoneyException *e) {
delete e;
CPPUNIT_FAIL("Unexpected exception");
}
// now modify the date
- t.setPostDate(QDate(2002,5,11));
+ t.setPostDate(TQDate(2002,5,11));
try {
m->modifyTransaction(t);
- CPPUNIT_ASSERT(m->balance("A000004", QDate()) == MyMoneyMoney(11000));
- CPPUNIT_ASSERT(m->balance("A000006", QDate()) == MyMoneyMoney(100000-12600));
- CPPUNIT_ASSERT(m->totalBalance("A000001", QDate()) == MyMoneyMoney(1600));
+ CPPUNIT_ASSERT(m->balance("A000004", TQDate()) == MyMoneyMoney(11000));
+ CPPUNIT_ASSERT(m->balance("A000006", TQDate()) == MyMoneyMoney(100000-12600));
+ CPPUNIT_ASSERT(m->totalBalance("A000001", TQDate()) == MyMoneyMoney(1600));
- //QMap<QString, QString>::ConstIterator it_k;
+ //TQMap<TQString, TQString>::ConstIterator it_k;
MyMoneyTransactionFilter f;
- QValueList<MyMoneyTransaction> transactionList (m->transactionList(f));
- QValueList<MyMoneyTransaction>::ConstIterator it_t (transactionList.begin());
+ TQValueList<MyMoneyTransaction> transactionList (m->transactionList(f));
+ TQValueList<MyMoneyTransaction>::ConstIterator it_t (transactionList.begin());
//it_k = m->m_transactionKeys.begin();
//CPPUNIT_ASSERT((*it_k) == "2002-05-10-T000000000000000001");
CPPUNIT_ASSERT((*it_t).id() == "T000000000000000001");
@@ -923,12 +923,12 @@ void MyMoneyDatabaseMgrTest::testModifyTransaction() {
ch = m->account("A000006");
// check that the account's transaction list is updated
- QValueList<MyMoneyTransaction> list;
+ TQValueList<MyMoneyTransaction> list;
MyMoneyTransactionFilter filter("A000006");
list = m->transactionList(filter);
CPPUNIT_ASSERT(list.size() == 2);
- QValueList<MyMoneyTransaction>::ConstIterator it;
+ TQValueList<MyMoneyTransaction>::ConstIterator it;
it = list.begin();
CPPUNIT_ASSERT((*it).id() == "T000000000000000001");
++it;
@@ -1004,7 +1004,7 @@ void MyMoneyDatabaseMgrTest::testRemoveUnusedAccount() {
CPPUNIT_ASSERT(i.accountCount() == 1);
CPPUNIT_ASSERT(m->accountCount() == 7);
- a.setInstitutionId(QString());
+ a.setInstitutionId(TQString());
m->modifyAccount(a);
m->removeAccount(a);
CPPUNIT_ASSERT(m->accountCount() == 6);
@@ -1045,7 +1045,7 @@ void MyMoneyDatabaseMgrTest::testRemoveInstitution() {
}
testModifyInstitution();
- testReparentAccount();
+ testRetqparentAccount();
MyMoneyInstitution i;
MyMoneyAccount a;
@@ -1066,7 +1066,7 @@ void MyMoneyDatabaseMgrTest::testRemoveInstitution() {
// now remove the institution and see if the account survived ;-)
try {
m->removeInstitution(i);
- a.setInstitutionId(QString());
+ a.setInstitutionId(TQString());
m->modifyAccount(a);
a = m->account("A000006");
CPPUNIT_ASSERT(a.institutionId().isEmpty());
@@ -1109,7 +1109,7 @@ void MyMoneyDatabaseMgrTest::testTransactionList() {
testAddTransactions();
- QValueList<MyMoneyTransaction> list;
+ TQValueList<MyMoneyTransaction> list;
MyMoneyTransactionFilter filter("A000006");
list = m->transactionList(filter);
CPPUNIT_ASSERT(list.count() == 2);
@@ -1117,7 +1117,7 @@ void MyMoneyDatabaseMgrTest::testTransactionList() {
CPPUNIT_ASSERT((*(list.at(1))).id() == "T000000000000000001");
filter.clear();
- filter.addAccount(QString("A000003"));
+ filter.addAccount(TQString("A000003"));
list = m->transactionList(filter);
CPPUNIT_ASSERT(list.count() == 1);
CPPUNIT_ASSERT((*(list.at(0))).id() == "T000000000000000002");
@@ -1355,7 +1355,7 @@ void MyMoneyDatabaseMgrTest::testPayeeName() {
testAddPayee();
MyMoneyPayee p;
- QString name("THB");
+ TQString name("THB");
// OK case
try {
@@ -1474,7 +1474,7 @@ void MyMoneyDatabaseMgrTest::testAddSchedule() {
}
// put some accounts in the db, so the tests don't break
- testReparentAccount();
+ testRetqparentAccount();
try {
CPPUNIT_ASSERT(m->scheduleList().count() == 0);
@@ -1488,11 +1488,11 @@ void MyMoneyDatabaseMgrTest::testAddSchedule() {
MyMoneySchedule::TYPE_DEPOSIT,
MyMoneySchedule::OCCUR_DAILY, 1,
MyMoneySchedule::STYPE_MANUALDEPOSIT,
- QDate(),
- QDate(),
+ TQDate(),
+ TQDate(),
true,
false);
- t1.setPostDate(QDate(2003,7,10));
+ t1.setPostDate(TQDate(2003,7,10));
schedule.setTransaction(t1);
m->addSchedule(schedule);
@@ -1511,8 +1511,8 @@ void MyMoneyDatabaseMgrTest::testAddSchedule() {
MyMoneySchedule::TYPE_DEPOSIT,
MyMoneySchedule::OCCUR_DAILY, 1,
MyMoneySchedule::STYPE_MANUALDEPOSIT,
- QDate(),
- QDate(),
+ TQDate(),
+ TQDate(),
true,
false);
m->addSchedule(schedule);
@@ -1534,11 +1534,11 @@ void MyMoneyDatabaseMgrTest::testAddSchedule() {
// MyMoneySchedule::TYPE_DEPOSIT,
// MyMoneySchedule::OCCUR_DAILY, 1,
// MyMoneySchedule::STYPE_MANUALDEPOSIT,
-// QDate(),
-// QDate(),
+// TQDate(),
+// TQDate(),
// true,
// false);
-// t1.setPostDate(QDate(2003,7,10));
+// t1.setPostDate(TQDate(2003,7,10));
// schedule.setTransaction(t1);
// m->addSchedule(schedule);
@@ -1648,11 +1648,11 @@ void MyMoneyDatabaseMgrTest::testScheduleList() {
}
// put some accounts in the db, so the tests don't break
- testReparentAccount();
+ testRetqparentAccount();
- QDate testDate = QDate::currentDate();
- QDate notOverdue = testDate.addDays(2);
- QDate overdue = testDate.addDays(-2);
+ TQDate testDate = TQDate::tqcurrentDate();
+ TQDate notOverdue = testDate.addDays(2);
+ TQDate overdue = testDate.addDays(-2);
MyMoneyTransaction t1;
MyMoneySplit s1, s2;
@@ -1664,8 +1664,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() {
MyMoneySchedule::TYPE_BILL,
MyMoneySchedule::OCCUR_ONCE, 1,
MyMoneySchedule::STYPE_DIRECTDEBIT,
- QDate(),
- QDate(),
+ TQDate(),
+ TQDate(),
false,
false);
t1.setPostDate(notOverdue);
@@ -1682,8 +1682,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() {
MyMoneySchedule::TYPE_DEPOSIT,
MyMoneySchedule::OCCUR_DAILY, 1,
MyMoneySchedule::STYPE_DIRECTDEPOSIT,
- QDate(),
- QDate(),
+ TQDate(),
+ TQDate(),
false,
false);
t2.setPostDate(notOverdue.addDays(1));
@@ -1700,8 +1700,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() {
MyMoneySchedule::TYPE_TRANSFER,
MyMoneySchedule::OCCUR_WEEKLY, 1,
MyMoneySchedule::STYPE_OTHER,
- QDate(),
- QDate(),
+ TQDate(),
+ TQDate(),
false,
false);
t3.setPostDate(notOverdue.addDays(2));
@@ -1717,8 +1717,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() {
MyMoneySchedule schedule4("Schedule 4",
MyMoneySchedule::TYPE_BILL,
MyMoneySchedule::OCCUR_WEEKLY, 1,
- MyMoneySchedule::STYPE_WRITECHEQUE,
- QDate(),
+ MyMoneySchedule::STYPE_WRITECHETQUE,
+ TQDate(),
notOverdue.addDays(31),
false,
false);
@@ -1736,7 +1736,7 @@ void MyMoneyDatabaseMgrTest::testScheduleList() {
CPPUNIT_FAIL("Unexpected exception");
}
- QValueList<MyMoneySchedule> list;
+ TQValueList<MyMoneySchedule> list;
// no filter
list = m->scheduleList();
@@ -1783,7 +1783,7 @@ void MyMoneyDatabaseMgrTest::testScheduleList() {
list = m->scheduleList("", MyMoneySchedule::TYPE_ANY,
MyMoneySchedule::OCCUR_ANY,
MyMoneySchedule::STYPE_ANY,
- QDate(),
+ TQDate(),
notOverdue.addDays(1));
CPPUNIT_ASSERT(list.count() == 3);
CPPUNIT_ASSERT(list[0].name() == "Schedule 1");
@@ -1804,8 +1804,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() {
list = m->scheduleList("", MyMoneySchedule::TYPE_ANY,
MyMoneySchedule::OCCUR_ANY,
MyMoneySchedule::STYPE_ANY,
- QDate(),
- QDate(),
+ TQDate(),
+ TQDate(),
true);
CPPUNIT_ASSERT(list.count() == 1);
CPPUNIT_ASSERT(list[0].name() == "Schedule 4");
@@ -1978,7 +1978,7 @@ void MyMoneyDatabaseMgrTest::testAccountList()
return;
}
- QValueList<MyMoneyAccount> accounts;
+ TQValueList<MyMoneyAccount> accounts;
m->accountList(accounts);
CPPUNIT_ASSERT(accounts.count() == 0);
testAddNewAccount();