summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneyscheduletest.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:31:01 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:31:01 -0600
commit252fce5a2a5384702fbcc1c9987284d7bd2e6943 (patch)
treed5768ff1e9065f29bec60c94d31880b38b4e82f2 /kmymoney2/mymoney/mymoneyscheduletest.cpp
parent69ef6c4beaa37474a2170d0bfe842de647f53102 (diff)
downloadkmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.tar.gz
kmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmymoney2/mymoney/mymoneyscheduletest.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneyscheduletest.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/kmymoney2/mymoney/mymoneyscheduletest.cpp b/kmymoney2/mymoney/mymoneyscheduletest.cpp
index 07b3cc6..3fe6afe 100644
--- a/kmymoney2/mymoney/mymoneyscheduletest.cpp
+++ b/kmymoney2/mymoney/mymoneyscheduletest.cpp
@@ -55,7 +55,7 @@ void MyMoneyScheduleTest::testConstructor() {
MyMoneySchedule::TYPE_BILL,
MyMoneySchedule::OCCUR_WEEKLY, 1,
MyMoneySchedule::STYPE_DIRECTDEBIT,
- TQDate::tqcurrentDate(),
+ TQDate::currentDate(),
TQDate(),
true,
true);
@@ -82,8 +82,8 @@ void MyMoneyScheduleTest::testSetFunctions() {
s.setType(MyMoneySchedule::TYPE_BILL);
CPPUNIT_ASSERT(s.type() == MyMoneySchedule::TYPE_BILL);
- s.setEndDate(TQDate::tqcurrentDate());
- CPPUNIT_ASSERT(s.endDate() == TQDate::tqcurrentDate());
+ s.setEndDate(TQDate::currentDate());
+ CPPUNIT_ASSERT(s.endDate() == TQDate::currentDate());
CPPUNIT_ASSERT(s.willEnd() == true);
}
@@ -229,16 +229,16 @@ void MyMoneyScheduleTest::testOverdue()
MyMoneySchedule sch_overdue;
MyMoneySchedule sch_intime;
- // the following checks only work correctly, if tqcurrentDate() is
+ // the following checks only work correctly, if currentDate() is
// between the 1st and 27th. If it is between 28th and 31st
// we don't perform them. Note: this should be fixed.
- if(TQDate::tqcurrentDate().day() > 27 || TQDate::tqcurrentDate().day() == 1) {
+ if(TQDate::currentDate().day() > 27 || TQDate::currentDate().day() == 1) {
std::cout << std::endl << "testOverdue() skipped because current day is between 28th and 2nd" << std::endl;
return;
}
- TQDate startDate = TQDate::tqcurrentDate().addDays(-1).addMonths(-23);
- TQDate lastPaymentDate = TQDate::tqcurrentDate().addDays(-1).addMonths(-1);
+ TQDate startDate = TQDate::currentDate().addDays(-1).addMonths(-23);
+ TQDate lastPaymentDate = TQDate::currentDate().addDays(-1).addMonths(-1);
TQString ref = TQString(
"<!DOCTYPE TEST>\n"
@@ -258,13 +258,13 @@ void MyMoneyScheduleTest::testOverdue()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n");
- TQString ref_overdue = ref.tqarg(startDate.toString(Qt::ISODate))
- .tqarg(lastPaymentDate.toString(Qt::ISODate))
- .tqarg(lastPaymentDate.toString(Qt::ISODate));
+ TQString ref_overdue = ref.arg(startDate.toString(Qt::ISODate))
+ .arg(lastPaymentDate.toString(Qt::ISODate))
+ .arg(lastPaymentDate.toString(Qt::ISODate));
- TQString ref_intime = ref.tqarg(startDate.addDays(1).toString(Qt::ISODate))
- .tqarg(lastPaymentDate.addDays(1).toString(Qt::ISODate))
- .tqarg(lastPaymentDate.addDays(1).toString(Qt::ISODate));
+ TQString ref_intime = ref.arg(startDate.addDays(1).toString(Qt::ISODate))
+ .arg(lastPaymentDate.addDays(1).toString(Qt::ISODate))
+ .arg(lastPaymentDate.addDays(1).toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1010,13 +1010,13 @@ void MyMoneyScheduleTest::testWriteXML() {
MyMoneySchedule::TYPE_BILL,
MyMoneySchedule::OCCUR_WEEKLY, 123,
MyMoneySchedule::STYPE_DIRECTDEBIT,
- TQDate::tqcurrentDate(),
+ TQDate::currentDate(),
TQDate(),
true,
true);
- sch.setLastPayment(TQDate::tqcurrentDate());
- sch.recordPayment(TQDate::tqcurrentDate());
+ sch.setLastPayment(TQDate::currentDate());
+ sch.recordPayment(TQDate::currentDate());
sch.setId("SCH0001");
MyMoneyTransaction t;
@@ -1070,9 +1070,9 @@ void MyMoneyScheduleTest::testWriteXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
CPPUNIT_ASSERT(doc.toString() == ref);
}
@@ -1098,9 +1098,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
// diff to ref_ok1 is that we now have an empty entrydate
// in the transaction parameters
@@ -1122,9 +1122,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
TQString ref_false = TQString(
"<!DOCTYPE TEST>\n"
@@ -1144,9 +1144,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1167,13 +1167,13 @@ void MyMoneyScheduleTest::testReadXML() {
try {
sch = MyMoneySchedule(node);
CPPUNIT_ASSERT(sch.id() == "SCH0002");
- CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::tqcurrentDate().addDays(7));
- CPPUNIT_ASSERT(sch.startDate() == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::currentDate().addDays(7));
+ CPPUNIT_ASSERT(sch.startDate() == TQDate::currentDate());
CPPUNIT_ASSERT(sch.endDate() == TQDate());
CPPUNIT_ASSERT(sch.autoEnter() == true);
CPPUNIT_ASSERT(sch.isFixed() == true);
CPPUNIT_ASSERT(sch.weekendOption() == MyMoneySchedule::MoveNothing);
- CPPUNIT_ASSERT(sch.lastPayment() == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.lastPayment() == TQDate::currentDate());
CPPUNIT_ASSERT(sch.paymentType() == MyMoneySchedule::STYPE_DIRECTDEBIT);
CPPUNIT_ASSERT(sch.type() == MyMoneySchedule::TYPE_BILL);
CPPUNIT_ASSERT(sch.name() == "A Name");
@@ -1181,7 +1181,7 @@ void MyMoneyScheduleTest::testReadXML() {
CPPUNIT_ASSERT(sch.occurenceMultiplier() == 1);
CPPUNIT_ASSERT(sch.nextDueDate() == sch.lastPayment().addDays(7));
CPPUNIT_ASSERT(sch.recordedPayments().count() == 1);
- CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::currentDate());
} catch(MyMoneyException *e) {
delete e;
CPPUNIT_FAIL("Unexpected exception");
@@ -1194,13 +1194,13 @@ void MyMoneyScheduleTest::testReadXML() {
try {
sch = MyMoneySchedule(node);
CPPUNIT_ASSERT(sch.id() == "SCH0002");
- CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::tqcurrentDate().addDays(7));
- CPPUNIT_ASSERT(sch.startDate() == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::currentDate().addDays(7));
+ CPPUNIT_ASSERT(sch.startDate() == TQDate::currentDate());
CPPUNIT_ASSERT(sch.endDate() == TQDate());
CPPUNIT_ASSERT(sch.autoEnter() == true);
CPPUNIT_ASSERT(sch.isFixed() == true);
CPPUNIT_ASSERT(sch.weekendOption() == MyMoneySchedule::MoveNothing);
- CPPUNIT_ASSERT(sch.lastPayment() == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.lastPayment() == TQDate::currentDate());
CPPUNIT_ASSERT(sch.paymentType() == MyMoneySchedule::STYPE_DIRECTDEBIT);
CPPUNIT_ASSERT(sch.type() == MyMoneySchedule::TYPE_BILL);
CPPUNIT_ASSERT(sch.name() == "A Name");
@@ -1208,7 +1208,7 @@ void MyMoneyScheduleTest::testReadXML() {
CPPUNIT_ASSERT(sch.occurenceMultiplier() == 1);
CPPUNIT_ASSERT(sch.nextDueDate() == sch.lastPayment().addDays(7));
CPPUNIT_ASSERT(sch.recordedPayments().count() == 1);
- CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::currentDate());
} catch(MyMoneyException *e) {
delete e;
CPPUNIT_FAIL("Unexpected exception");
@@ -1236,9 +1236,9 @@ void MyMoneyScheduleTest::testHasReferenceTo()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate))
- .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1872,7 +1872,7 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime()
// https://bugs.kde.org/show_bug.cgi?id=231029
MyMoneySchedule sch;
- TQDate paymentInFuture = TQDate::tqcurrentDate().addDays(7);
+ TQDate paymentInFuture = TQDate::currentDate().addDays(7);
TQString ref_ok = TQString(
"<!DOCTYPE TEST>\n"
@@ -1887,9 +1887,9 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(paymentInFuture.toString(Qt::ISODate))
- .tqarg(paymentInFuture.toString(Qt::ISODate))
- .tqarg(paymentInFuture.toString(Qt::ISODate));
+ ).arg(paymentInFuture.toString(Qt::ISODate))
+ .arg(paymentInFuture.toString(Qt::ISODate))
+ .arg(paymentInFuture.toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1900,7 +1900,7 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime()
sch = MyMoneySchedule(node);
CPPUNIT_ASSERT(sch.isFinished() == true);
CPPUNIT_ASSERT(sch.occurencePeriod() == MyMoneySchedule::OCCUR_MONTHLY);
- CPPUNIT_ASSERT(sch.paymentDates(TQDate::tqcurrentDate(), TQDate::tqcurrentDate().addDays(21)).count() == 0);
+ CPPUNIT_ASSERT(sch.paymentDates(TQDate::currentDate(), TQDate::currentDate().addDays(21)).count() == 0);
} catch (MyMoneyException *e) {
delete e;
CPPUNIT_FAIL("Unexpected exception");