diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
commit | a374efce3a207b39514be3c52264091400ce297e (patch) | |
tree | 77bdf654b55826d4f59b53a5621310206bcaead1 /libkdeedu/extdate/test_extdate.cc | |
parent | f81a494f3957d5cf38c787973415597941934727 (diff) | |
download | tdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip |
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdeedu/extdate/test_extdate.cc')
-rw-r--r-- | libkdeedu/extdate/test_extdate.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libkdeedu/extdate/test_extdate.cc b/libkdeedu/extdate/test_extdate.cc index d63d1558..63b2120b 100644 --- a/libkdeedu/extdate/test_extdate.cc +++ b/libkdeedu/extdate/test_extdate.cc @@ -5,7 +5,7 @@ void test1_unit(int a_year) { - std::cout << a_year << " (QDate|ExtDate): " << ((TQDate::leapYear(a_year)) ? "yes" : "no") + std::cout << a_year << " (TQDate|ExtDate): " << ((TQDate::leapYear(a_year)) ? "yes" : "no") <<"|"<< ((ExtDate::leapYear(a_year)) ? "yes" : "no") << std::endl; } @@ -46,7 +46,7 @@ void test1() void test2_unit(int y, int m, int d) { - QDate q(y, m, d); + TQDate q(y, m, d); ExtDate e(y, m, d); int q_week_number = q.dayOfWeek(); int e_week_number = e.dayOfWeek(); @@ -128,7 +128,7 @@ void test2() void test3_unit(int y, int m, int d, int dm) { - QDate q(y, m, d); + TQDate q(y, m, d); ExtDate e(y, m, d); TQDate q2 = q.addMonths(dm); ExtDate e2 = e.addMonths(dm); @@ -157,9 +157,9 @@ void test3() } void test4_unit(int y, int m, int d, int dy) { - QDate q(y, m, d); + TQDate q(y, m, d); ExtDate e(y, m, d); - QDate q2 = q.addYears(dy); + TQDate q2 = q.addYears(dy); ExtDate e2 = e.addYears(dy); std::cout << e.toString("%d.%m.%Y").local8Bit() << " + " << dy << " years :: ExtDate : " << e2.toString().local8Bit() << " TQDate : " @@ -225,7 +225,7 @@ void test5() uint i; std::cout << "Date.toString(\"...\")" << std::endl; - std::cout << "Ext Format : ExtDate :: Q Format : QDate\n" << std::endl; + std::cout << "Ext Format : ExtDate :: Q Format : TQDate\n" << std::endl; for (i = 0 ; i < sizeof(q_set_of_formats)/sizeof(q_set_of_formats[0]) ; i++) { @@ -277,16 +277,16 @@ void test6() void test7() { std::cout << "Express the current date:\n" << std::endl; - TQDate q = TQDate::currentDate(Qt::LocalTime); - ExtDate e = ExtDate::currentDate(Qt::TimeSpec(Qt::LocalTime)); - std::cout << "Qt::LocalTime :: ExtDate : " << e.toString().local8Bit() << " TQDate : " + TQDate q = TQDate::tqcurrentDate(TQt::LocalTime); + ExtDate e = ExtDate::tqcurrentDate(TQt::TimeSpec(TQt::LocalTime)); + std::cout << "TQt::LocalTime :: ExtDate : " << e.toString().local8Bit() << " TQDate : " << q.toString().local8Bit() << std::endl; - q = TQDate::currentDate(Qt::UTC); - e = ExtDate::currentDate(Qt::UTC); - std::cout << "Qt::UTC :: ExtDate : " << e.toString().local8Bit() << " TQDate : " + q = TQDate::tqcurrentDate(TQt::UTC); + e = ExtDate::tqcurrentDate(TQt::UTC); + std::cout << "TQt::UTC :: ExtDate : " << e.toString().local8Bit() << " TQDate : " << q.toString().local8Bit() << std::endl; - q = TQDate::currentDate(); - e = ExtDate::currentDate(); + q = TQDate::tqcurrentDate(); + e = ExtDate::tqcurrentDate(); std::cout << "<default> :: ExtDate : " << e.toString().local8Bit() << " TQDate : " << q.toString().local8Bit() << std::endl; std::cout << "--------------------" << std::endl; @@ -311,8 +311,8 @@ void test8() { void test9() { std::cout << "TQDateTime : ExtDateTime: \n" << std::endl; - TQDateTime q = TQDateTime::currentDateTime(); - ExtDateTime e = ExtDateTime::currentDateTime(); + TQDateTime q = TQDateTime::tqcurrentDateTime(); + ExtDateTime e = ExtDateTime::tqcurrentDateTime(); std::cout << q.toString().local8Bit() << " : " << e.toString().local8Bit() << std::endl; std::cout << "--------------------" << std::endl; |