From 1f9d00360b9018301630ce062d7dda0c6583edfb Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:56:17 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 252fce5a2a5384702fbcc1c9987284d7bd2e6943. --- kmymoney2/mymoney/mymoneyscheduletest.cpp | 88 +++++++++++++++---------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'kmymoney2/mymoney/mymoneyscheduletest.cpp') diff --git a/kmymoney2/mymoney/mymoneyscheduletest.cpp b/kmymoney2/mymoney/mymoneyscheduletest.cpp index 3fe6afe..07b3cc6 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::currentDate(), + TQDate::tqcurrentDate(), 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::currentDate()); - CPPUNIT_ASSERT(s.endDate() == TQDate::currentDate()); + s.setEndDate(TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(s.endDate() == TQDate::tqcurrentDate()); 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 currentDate() is + // the following checks only work correctly, if tqcurrentDate() 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::currentDate().day() > 27 || TQDate::currentDate().day() == 1) { + if(TQDate::tqcurrentDate().day() > 27 || TQDate::tqcurrentDate().day() == 1) { std::cout << std::endl << "testOverdue() skipped because current day is between 28th and 2nd" << std::endl; return; } - TQDate startDate = TQDate::currentDate().addDays(-1).addMonths(-23); - TQDate lastPaymentDate = TQDate::currentDate().addDays(-1).addMonths(-1); + TQDate startDate = TQDate::tqcurrentDate().addDays(-1).addMonths(-23); + TQDate lastPaymentDate = TQDate::tqcurrentDate().addDays(-1).addMonths(-1); TQString ref = TQString( "\n" @@ -258,13 +258,13 @@ void MyMoneyScheduleTest::testOverdue() " \n" " \n" "\n"); - TQString ref_overdue = ref.arg(startDate.toString(Qt::ISODate)) - .arg(lastPaymentDate.toString(Qt::ISODate)) - .arg(lastPaymentDate.toString(Qt::ISODate)); + TQString ref_overdue = ref.tqarg(startDate.toString(Qt::ISODate)) + .tqarg(lastPaymentDate.toString(Qt::ISODate)) + .tqarg(lastPaymentDate.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)); + 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)); TQDomDocument doc; TQDomElement node; @@ -1010,13 +1010,13 @@ void MyMoneyScheduleTest::testWriteXML() { MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 123, MyMoneySchedule::STYPE_DIRECTDEBIT, - TQDate::currentDate(), + TQDate::tqcurrentDate(), TQDate(), true, true); - sch.setLastPayment(TQDate::currentDate()); - sch.recordPayment(TQDate::currentDate()); + sch.setLastPayment(TQDate::tqcurrentDate()); + sch.recordPayment(TQDate::tqcurrentDate()); sch.setId("SCH0001"); MyMoneyTransaction t; @@ -1070,9 +1070,9 @@ void MyMoneyScheduleTest::testWriteXML() { " \n" " \n" "\n" - ).arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); CPPUNIT_ASSERT(doc.toString() == ref); } @@ -1098,9 +1098,9 @@ void MyMoneyScheduleTest::testReadXML() { " \n" " \n" "\n" - ).arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().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() { " \n" " \n" "\n" - ).arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); TQString ref_false = TQString( "\n" @@ -1144,9 +1144,9 @@ void MyMoneyScheduleTest::testReadXML() { " \n" " \n" "\n" - ).arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().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::currentDate().addDays(7)); - CPPUNIT_ASSERT(sch.startDate() == TQDate::currentDate()); + CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::tqcurrentDate().addDays(7)); + CPPUNIT_ASSERT(sch.startDate() == TQDate::tqcurrentDate()); 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::currentDate()); + CPPUNIT_ASSERT(sch.lastPayment() == TQDate::tqcurrentDate()); 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::currentDate()); + CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::tqcurrentDate()); } 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::currentDate().addDays(7)); - CPPUNIT_ASSERT(sch.startDate() == TQDate::currentDate()); + CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::tqcurrentDate().addDays(7)); + CPPUNIT_ASSERT(sch.startDate() == TQDate::tqcurrentDate()); 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::currentDate()); + CPPUNIT_ASSERT(sch.lastPayment() == TQDate::tqcurrentDate()); 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::currentDate()); + CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::tqcurrentDate()); } catch(MyMoneyException *e) { delete e; CPPUNIT_FAIL("Unexpected exception"); @@ -1236,9 +1236,9 @@ void MyMoneyScheduleTest::testHasReferenceTo() " \n" " \n" "\n" - ).arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)) - .arg(TQDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().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::currentDate().addDays(7); + TQDate paymentInFuture = TQDate::tqcurrentDate().addDays(7); TQString ref_ok = TQString( "\n" @@ -1887,9 +1887,9 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime() " \n" " \n" "\n" - ).arg(paymentInFuture.toString(Qt::ISODate)) - .arg(paymentInFuture.toString(Qt::ISODate)) - .arg(paymentInFuture.toString(Qt::ISODate)); + ).tqarg(paymentInFuture.toString(Qt::ISODate)) + .tqarg(paymentInFuture.toString(Qt::ISODate)) + .tqarg(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::currentDate(), TQDate::currentDate().addDays(21)).count() == 0); + CPPUNIT_ASSERT(sch.paymentDates(TQDate::tqcurrentDate(), TQDate::tqcurrentDate().addDays(21)).count() == 0); } catch (MyMoneyException *e) { delete e; CPPUNIT_FAIL("Unexpected exception"); -- cgit v1.2.1